Hi guys!
In this post, I will be giving a complete walkthrough on how to create a React App with the help of React Router Dom.
React Router v6 i...
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
In v6 Switch doesn't working.
Hi
Yes in v6 switch has been replaced by
Routes
That is why I am not using switch in this tutorial.
how to get macth,history,location in v6
Switch replaced by Routes
The tutorial has been updated to include new features in React Router 6
Hmmm good point
I am always messing up :)
Actually i wrote this tutorial a week back.
Will update it soon
Great walk through! One comment though, technically since this is not jumping to hashlinks and rendering completely different views this would be a multi-page application, not a SPA correct?
Yes it is an application with multiple pages, but since you do not reload the page when navigating to other pages (only the url changes) you are essentially on the same page all the time. So a single page with dynamic content.
Ah thank you, professionally I've only worked on MVC/ Multi-Page applications so in my free time I was trying to wrap my head around the SPA architecture and how they are different. I'm implementing this in a pet project and really appreciate the details and time you put into this!
Thanks a lot!
How to Set Up Router and Route to Other Components . Bring my lover back to me