https://github.com/jzo001/aspnetcoremvcwithreact
How to integrate ReactJS into ASP.NET Core MVC project with the ability to server-side rendering the HTML content
https://github.com/jzo001/aspnetcoremvcwithreact
dotnet dotnetcore javascript nodejs react reactjs server-side-rendering typescript
Last synced: 11 days ago
JSON representation
How to integrate ReactJS into ASP.NET Core MVC project with the ability to server-side rendering the HTML content
- Host: GitHub
- URL: https://github.com/jzo001/aspnetcoremvcwithreact
- Owner: JZO001
- Created: 2020-03-31T11:42:34.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-09T15:43:52.000Z (over 3 years ago)
- Last Synced: 2025-03-31T13:07:36.881Z (about 1 month ago)
- Topics: dotnet, dotnetcore, javascript, nodejs, react, reactjs, server-side-rendering, typescript
- Language: JavaScript
- Homepage:
- Size: 826 KB
- Stars: 10
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ASPNETCoreMVCwithReact
How to integrate ReactJS into ASP.NET Core MVC project with the ability to server-side rendering the HTML contentFor detailed documentation, please visit: https://jzo.hu/blog/1002
To start the project for development, run "npm run start" in command prompt (don't forget to navigate to the ClientApp folder). For production optimized compilation, run "npm run build". Finally, in Visual Studio just simply run the project with IIS Express.
In the browser, you see the difference in the HTML HEAD, if you open three browser tab with these links:
https://localhost:44371/
https://localhost:44371/article/1
https://localhost:44371/article/2
Server render the initial HTML content (head, meta, scripts, styles, body, etc), sends it to the client in the response, than React starts. This solution is usefull,
if you would like to control the contents before the site rendered in the browser.