How to use a react router with React.net

I am working on an asp.net project with a reaction and want to use a react router. On git repo, the setup is explained only for Node.js. I found TypeScript NuGet packages , but after installing them, I can no longer build my project due to compilation errors.

Does anyone have experience installing a jet router for asp.net projects?

+4
source share
2 answers

What we did to create our application in React. We created our application in React in Visual Studio Code with Redux and React-Router. Webpack is used to create all files. Upon completion of the entire application, we create js (transpiled and minified) and add a script tag that points to this js package URL on our web application page (in particular, the .aspx page).

Now you may encounter a reactive router if you placed it inside the directory of your existing project. E.g. inside root - you have a folder called myapp. If so, you need to make changes to your Routes in your response application in order to have a base name.

React.NET, - , , - , -

, .

+1

React.NET, ASP.NET. - . , (main.js, chunks, css /). ASP.NET index.html .

React . , , , , ! !

+1

Source: https://habr.com/ru/post/1651541/


All Articles