npm / nuqs
nuqs
What changed in nuqs 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
16 breaking10 new APIs and options1 performance8 behavior and defaults38 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initnuqs 273 changes
Breaking changes 16
parseAsIsoDate and IsoDateTime reject impossible calendar dates.
Strict loaders reject invalid empty queries.
Invalid timestamps are rejected.
Duplicate library copies now share internal state.
Debounced state updates no longer flush.
CommonJS support is dropped; the package is ESM only.
nuqs v2 requires Next.js 14.2.0 or later and drops support for 14.0.3.
The server export is renamed from nuqs/parsers; server-side code should import from nuqs/server to avoid invoking client functions from the server.
Apps must be wrapped with a NuqsAdapter context provider connecting framework APIs to the hooks' internals.
The Options type is no longer generic.
parseAsJson now requires a runtime validation function, which validates data and infers the returned type.
The deprecated queryTypes bag of parsers is removed; use individual parseAsXYZ parsers for better tree-shakeability.
The startTransition option no longer automatically sets shallow: false.
The deprecated helper is removed; since Next.js 14.0.5, useSearchParams is reactive to shallow search params updates.
The client import now includes the use client directive, so server-side code needs to import from nuqs/server.
urlKeys moved into the UseQueryStatesOptions type.
New APIs and options 10
The React adapter can seed SSR search params via serverSearch.
Adds history to adapters’ defaultOptions.
Adds support for React Router v8.
Export the CreateLoaderOptions type so developers can use it in their code.
Adds support for React Router v5.
An unstable API is available for creating custom adapters.
Specialised adapters are provided for both Next.js routers.
An adapter for One is added.
A React Router adapter is added.
A Remix adapter is added.
Performance 1
The useQueryStates bundle size is trimmed.
Behavior and default changes 8
The debounce callback is passed at push time.
Query keys on the Object prototype are supported.
Server runtimes that do not provide process are supported.
Updates location.search synchronously.
Server-side debug detection now uses process.env.DEBUG.
Passing undefined means leave the value as-is in useQueryStates.
Makes boolean parsing case insensitive.
UseQueryStatesOptions is now generic over the key map and is a type rather than an interface.
Fixes and other changes 38
Debounce promises are recovered after synchronous callback errors.
Resolves React types under pnpm global virtual store.
Flushed queue values are kept until the adapter shows them.
Pending query state stays in its transition lane.
Render once on mount when the URL contains a value.
Recover state after a navigation render is discarded.
The testing adapter's URL update queue is reset once per mount.
React adapter queues are reset on popstate.
Fragment-only history updates preserve the query.
Pending URL updates are canceled on history navigation.
Fragments are ignored in query-only URLs.
Comma-separated values are distinguished from repeated query keys.
Explicit empty native arrays are preserved.
The queue recovers after URL middleware errors.
Reactivity now works for startTransition callbacks.
Negative hexadecimal values round-trip correctly.
Credentials are preserved in URL serializer bases.
Options and defaults are refreshed correctly.
Preserves query state across concurrent rebases.
Recovers state after a render is discarded.
Supports multi-value search params in createSearchParamsCache.
Preserves the hash fragment in createSerializer bases.
Fixes unwatched keys leaking through filterSearchParams.
Applies call > parser > global precedence for limitUrlUpdates.
Transitions remain pending while React Router loaders run.
Fixes stale values under Activity.
Fixes incorrect transient state when updating in useEffect.
Fixes stale URL values when revisiting a page under Next.js cacheComponents.
Fixes stale search parameters leaking across React Router navigation.
Fixes cross-page transitions in TanStack Router.
Prevents infinite re-renders with TSR viewport preloading.
Resets the queue after updates in the Next.js app router.
React Router adapters now wait for navigation before syncing.
The directive was removed from .d.ts definition files.
Forwards processUrlSearchParams through the debounce queue.
Pass the full pathname and search in TSR to avoid trailing slashes.
Fixes a TypeError in the serializer when an array has a default value.
Other adapters render pretty URLs.