API/<ReactRouterAdapter>
<ReactRouterAdapter>
componentsrc/components/react-router-adapter.tsx1 parameter
Make React Router the router adapter of every list below it.
Render it inside the router — in the root route’s component, around its <Outlet /> — so the
lists read React Router’s location and navigate through it. Only the components that use a list
re-render when the URL changes.
Import
Section titled “Import”import { ReactRouterAdapter } from '@qubeejs/react/react-router';Signature
Section titled “Signature”function ReactRouterAdapter(props: ReactRouterAdapterProps): ReactElementParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
props |
ReactRouterAdapterProps |
The subtree, and whether a list navigation lets React Router reset the scroll |
Returns
Section titled “Returns”The subtree, with the adapter in context
Example
Section titled “Example”function Root(): ReactElement { return ( <ReactRouterAdapter> <Outlet /> </ReactRouterAdapter> );}