How to build a React Application with .NET Core in Visual Studio Code
In my previous articles I have explained things like how to create the project, how to add files, how to run the project etc. If you’re new to the topics I’m discussing here it might be a good idea to refer my previous articles.
First we’ll look at the components we’ll be adding to the project. The two components go inside the ClientApp -> Source -> Components folder.
This is the Greeting components that gives us the following page.
Here is the Grades component and its visual screen.
Here is the code for the App.js file.
Let’s look at the files necessary for the .NET Core API.
First here’s the Grades class that goes inside the header folder.
Then here’s the code for the GradesController.
To avoid a bug I had to create a MyControllerBase and extend the GradesController from it.
The Controllers go inside the Controllers folder.
I thought the NavMenu class might come in handy for you.
I think I’ve uploaded all the files necessary. If there’s something missing let me know.
This application does not use database connectivity. For that refer my next article.
Thanks!