- useRouteParams<T, I>(routes, history): null | T
Type Parameters
- T extends Record<string, any> = Record<string, any>
- I extends ISwitchItem = ISwitchItem
Parameters
- routes: I[]
- history: MemoryHistory | BrowserHistory | HashHistory
Returns null | T
- The parameters of the currently active route.
The
useRouteParams
hook is used to retrieve the parameters of the currently active route.