useNavigate function returns the navigation callback that allows components to programmatically navigate to different routes or paths.
Parameters
NoneReturns
Returns the navigation callback function that accepts an options object with:to- The path to navigate to (required)props- Optional key-value pairs to pass to the destination route
Usage
Basic navigation
Navigation with props
Notes
- The actual navigation behavior depends on the runtime environment
- In web environments, this typically integrates with browser navigation
- The default implementation logs the navigation attempt if not overridden
- Navigation options support depends on the specific renderer implementation
