Inertia.js Adapter

Using nuqs in Inertia.js apps (eg: with a Laravel backend)

François Best

François Best

@franky47

Installation

npx shadcn@latest add @nuqs/adapter-inertia

Usage

Inertia is supported as a community-contributed adapter.

Install the adapter using the CLI or copy/paste above, then integrate the adapter into the root layout file, by wrapping it around the children of the layout component:

resources/js/Layouts/AppLayout.tsx
import { NuqsAdapter } from '.@/lib/nuqs-inertia-adapter'
import { PropsWithChildren } from 'react'

export default function Layout({ children }: PropsWithChildren) {
  return <NuqsAdapter>{children}</NuqsAdapter>
}

Try it out

Check out the demo app which is a fork of Inertia’s Ping CRM demo with nuqs.


The custom adapters APIs are not yet stable and may change in the future in a minor or patch release (not following SemVer).

Use the registry's RSS feed to stay updated on any changes.

On this page