Props
Optionalrelative?: RelativeRoutingTypeHow to interpret relative routing in the to prop.
See RelativeRoutingType.
Optionalreplace?: booleanWhether to replace the current entry in the History
stack
Optionalstate?: anyState 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
A component-based version of useNavigate to use in a
React.Componentclass where hooks cannot be used.It's recommended to avoid using this component in favor of useNavigate.