The mindset of having and running all applications locally on a device, stationary or mobile, has been already for quite some time shifting towards a completely different, cloud based approach. As applications move from local devices to the cloud and essentially become websites, a user interface, who’s speed and reliability in a local application are taken for granted, becomes perhaps the most important part of the context of the cloud based approach, especially in applications dealing with large amounts of data.
Instead of rendering countless HTML files from the server, in a Single Page Application React, when browser URL changes, renders components, which are essentially JavaScript files, and that emphasizes the importance of the React Router being actually one of the most important part of React both conceptually and technically.
Using nested routes for rendering React components, instead of HTML files in an MVC application, is a great way from the point of view of user experience as it may save from a few seconds to even minutes, rendering whatever the user wants to see with the speed of light, but there are a few considerations that must be taken into account, one of them is using the exact path.
When wrapping the div that we normally return in the App component into
The App component with all the routes defined in the same div can be found here.