Do you want to …

  • Do you want to create a cool React app?
  • Do you want to create an API for your back-end using .NET core?
  • Do you want your React app to talk to the API?
  • You don’t know where to start?

If you answered Yes to the above questions, this StarterKit is for you.

Starter kit: rajeev_n/react-dotnetcore-starterkit

The StarterKit contains a React app with Redux store and a web API using ASP.Net Core MVC. They are wired together using NPM and Webpack. Babel is used for transpiling ES6. There is an API layer that uses whatwg-fetch for REST calls. It is handy to have an API layer to help build your React app against fake data before commencing work on web services or while it is being developed by someone else.

Open the solution in VS2015 or later and run the application. This will deploy IIS Express and host the wwwroot folder which will only have the index.html file.

When we run npm start, Webpack will transpile react app and generate the final css and js files in the wwwroot folder. This command also enables hot reloading, meaning any changes you make to the React app will result in immediately updated wwwroot.

This is a rough version, hope it helps you to get started. I didn’t have enough time to include testing into this or consider other scenarios. You can always message me, if you need help with the StarterKit.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s