Redirect component for react-router v6
npm install react-router6-redirect component and handles any dynamic parts. component does not handle dynamic parts of the to prop.shell
npm i react-router6-redirect
`Setup
`js
import {Route} from 'react-router-dom'
import {Redirect} from 'react-router6-redirect';
`Usage
Important: each param name present in the Redirect's to prop must exist in the Route's path prop.
`jsx
}/>
`Supported props
`ts
export interface RedirectProps {
to: string;
state?: any;
relative?: RelativeRoutingType;
}
``