Router hooks
Rspress re-exports the routing utilities from react-router-dom, letting you access navigation and location data without adding extra dependencies.
- Type: the same signatures as the corresponding
react-router-domhooks
Commonly used hooks include useLocation, useNavigate, useParams, useSearchParams, and useMatches.