When you create new project using dotnet new react
template, you'll get ASP.NET Core application with ClientApp
folder for SPA frontend. This may be convenient if you full-stack developer, you have exactly one SPA and you write frontend from ground-up yourself.
Using dotnet new react
has many downsides and you'll tend to extract ClientApp
to dedicated folder:
- If team has dedicated frontend developers, they may find more convenient to develop SPA in dedicated folder or dedicated git repository.
dotnet new react
template's dependencies are outdated, and frontend developers forced to executeyar create react-app
manually then diff/copy output toClientApp
folder.dotnet new react
template is javascript template, there is no easy way to use typescript. You need to follow guide manually every time. This can be automated withyarn create react-app --template typescript
, then diff/copy output toClientApp
folder.dotnet new react
- is not the tool for frontend developers after all :)- It's scales poorly. Imagine you have more than one SPA with common shared components. You'll end up with monorepo in dedicated folder using yarn workspaces and lerna.
In this post I'll show how to publish ASP.NET Core web application along with SPA from dedicated monorepo folder.