A component-based version of useNavigate to use in a
React.Component class where
hooks cannot be used.
It's recommended to avoid using this component in favor of useNavigate.
<Navigate to="/tasks" />
function Navigate({ to, replace, state, relative }: NavigateProps): null
How to interpret relative routing in the to prop.
See RelativeRoutingType.
Whether to replace the current entry in the History
stack
State to pass to the new Location to store in history.state.
The path to navigate to. This can be a string or a Path object