Skip to content

Visual Studio 2019 ASP.NET Core 3 React Template where the React SPA is replaced with a Typescript version.

License

Notifications You must be signed in to change notification settings

SebastianLng/asp-net-core-react-typescript-template

Repository files navigation

ASP.NET Core 3 React Typescript Template

Create a default React Typescript app:

  1. Create an ASP.NET Core 3 project with the React Template in Visual Studio.
  2. Remove the Content of the "ClientApp" Folder.
  3. Create a react app with create-react-app in an arbitrary folder somewhere else. For example:
  npx create-react-app myapp --typescript
  1. Copy the content of the created Typescript React app into the "ClientApp"-Folder.
  2. Visual Studio should prompt you to install the Typescript NuGet Package. If it does not, you can add the reference manually:
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="3.7.2">
    <PrivateAssets>all</PrivateAssets>
    <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
  1. You now have a working, debuggable default react app with Typescript running with ASP.NET Core.

Create a project with the React Bootstrap app of the Visual Studio Template

Porting the bootstrap app included in the default Visual Studio templates needs a few additional steps (libraries, typings, ...). The "AspNetCoreReactTypescript-Bootstrap" folder contains an example how a Typescript port of the template could look like.

About

Visual Studio 2019 ASP.NET Core 3 React Template where the React SPA is replaced with a Typescript version.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published