React Router 6 brings many new features.
The React community makes use of two popular packages for routing – Reach Router and React Router.
With v6. these two router libraries will be merged into the React Router library.
As a result, React Router 6 will have extra features such as nested routing, relative links, relative routes, automatic route ranking, and so on.
How to Install React Router v6
You can install React Router 6 from npm using the following command:
npm install react-router@6 react-router-dom@6