MENU
useMatch
useMatch(pattern) tests an arbitrary pattern against the current URL and returns a match object (or null), replacing useRouteMatch(). Building nested routes no longer relies on a hook returning "path"/"url" strings to concatenate at all – see Nesting for the current, JSX-based approach using nested <Route>s and <Outlet>.