alepha@docs:~/docs/framework/reference/react-hooks$
cat useRouterState.md | pretty
1 min read
Last commit:

#useRouterState

#Import

typescript
1import { useRouterState } from "alepha/react/router";

#Overview

Subscribes to the router's live state — the matched route, its params and query, and the pending-transition flag. Re-renders on every navigation. Throws outside a router context.