Controlling Redirects of Particular Routes
Learn how to navigate to a new URL by overriding the current URL.
We'll cover the following...
The Redirect
component
Apart from the usual Route
component to react to particular Routes, React Router also offers a Redirect
component. The Redirect component is initialized with a to
prop in which we can provide a destination URL that the component should redirect to. It allows us to declaratively
decide in JSX where to ...