useNavigate
Imperative navigation hook.
Returns a stable navigate(options) function to change the current location programmatically. Prefer the Link component for user-initiated navigation, and use this hook from effects, callbacks, or handlers where imperative navigation is required.
Options:
from: Optional route base used to resolve relativetopaths.
Return
A function that accepts NavigateOptions.