Im trying to pass parameters through Redirect component, but i get this.props.location.state as undefined. What should i do?
Those will be on this.props.match.params.
params also gets undefined
Having the same issue on 5.1.2
Protected Route component:
return <Redirect
to={{
pathname: '/auth/login',
state: { from: props.location },
}}
/>
Login Component:
props.location.state // is undefined
Most helpful comment
Having the same issue on 5.1.2
Protected Route component:
Login Component: