Navigate

Changes the current location.

Note: This API is mostly useful in React.Component subclasses that are not able to use hooks. In functional components, we recommend you use the useNavigate hook instead.

See also

https

://reactrouter.com/v6/components/navigate