react-router is the de-facto standard routing solution for react applications.
The thing is that with redux and a single state tree, the URL is part of that
connected-react-router takes care of synchronizing the location of our
application with the application state.
for more information)
To add a new route, simply import the
Route component and use it standalone or inside the
Switch component (all part of RR5 API):
Top level routes are located in
If you want your route component (or any component for that matter) to be loaded asynchronously, use container or component generator with 'Do you want to load resources asynchronously?' option activated.
To go to a new page use the
push function by
You can do the same thing in a saga:
For example, if you have a route called
/about and want to make a child route called
/about/our-team, follow the example
App.js to create a
Switch within the parent component. Also remove the
exact property from the
about parent route.
You can read more in