useMatchRoute

Create a matcher function for testing locations against route definitions.

The returned function accepts standard navigation options (to, params, search, etc.) and returns either false (no match) or the matched params object when the route matches the current or pending location.

Useful for conditional rendering and active UI states.