- useRouteItem<T, I>(routes, history): null | I
Type Parameters
- T extends Record<string, any> = Record<string, any>
- I extends ISwitchItem = ISwitchItem
Parameters
- routes: I[]
- history: MemoryHistory | BrowserHistory | HashHistory
Returns null | I
- The current switch item based on the provided routes and history.
Returns the current item based on the provided routes and history.