Last post Dec 11, 2020 04:36 PM by SaeedP
Member
18 Points
222 Posts
Dec 11, 2020 03:37 PM|SaeedP|LINK
Hello,
In react/ASP.NET Core, the template has assumed you have just a page in your application.
But if I have more than one page in my application how should manage to route?
I have some experience with the Blazor server-side, on there you can simply manage to route and navigate between pages.
regards,
Saeed
All-Star
57864 Points
15493 Posts
Dec 11, 2020 04:02 PM|bruce (sqlwork.com)|LINK
if you use the template:
dotnet new react
it creates a 3 page sample app. if you look in app.js you will see the route table. the fetch data page even has sample ajax.
note: the sample uses react-router, but there are other react router libraries available.
Dec 11, 2020 04:36 PM|SaeedP|LINK
Thanks for the answer.
Member
18 Points
222 Posts
react/ASP.NET Core
Dec 11, 2020 03:37 PM|SaeedP|LINK
Hello,
In react/ASP.NET Core, the template has assumed you have just a page in your application.
But if I have more than one page in my application how should manage to route?
I have some experience with the Blazor server-side, on there you can simply manage to route and navigate between pages.
regards,
Saeed
All-Star
57864 Points
15493 Posts
Re: react/ASP.NET Core
Dec 11, 2020 04:02 PM|bruce (sqlwork.com)|LINK
if you use the template:
dotnet new react
it creates a 3 page sample app. if you look in app.js you will see the route table. the fetch data page even has sample ajax.
note: the sample uses react-router, but there are other react router libraries available.
Member
18 Points
222 Posts
Re: react/ASP.NET Core
Dec 11, 2020 04:36 PM|SaeedP|LINK
Thanks for the answer.