Skip to content
API/<NextAdapter>

<NextAdapter>

component
src/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 { NextAdapter } from '@qubeejs/react/next';
function NextAdapter(props: NextAdapterProps): ReactElement
Parameter Type Description
props NextAdapterProps The subtree, and whether navigations scroll to the top

The subtree, with the adapter in context

app/layout.tsx
export default function RootLayout({ children }: { children: ReactNode }): ReactElement {
return (
<html lang="en">
<body>
<NextAdapter>{children}</NextAdapter>
</body>
</html>
);
}

NextAdapterProps