API/<NextAdapter>
<NextAdapter>
componentsrc/components/next-adapter.tsx1 parameter
Make the Next.js App Router the router adapter of every list below it.
Render it in a layout — a Server Component can render it directly, because this entry is a
client module and the provider takes only serialisable props. It reads no search params
itself: only the components that use a list do, and on a statically rendered route those need
a <Suspense> boundary above them, as Next.js requires.
Import
Section titled “Import”import { NextAdapter } from '@qubeejs/react/next';Signature
Section titled “Signature”function NextAdapter(props: NextAdapterProps): ReactElementParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
props |
NextAdapterProps |
The subtree, and whether navigations scroll to the top |
Returns
Section titled “Returns”The subtree, with the adapter in context
Example
Section titled “Example”export default function RootLayout({ children }: { children: ReactNode }): ReactElement { return ( <html lang="en"> <body> <NextAdapter>{children}</NextAdapter> </body> </html> );}