nuqs
banner
nuqs.dev
nuqs
@nuqs.dev
Type-safe search params state manager for React frameworks.
Like useState, but stored in the URL query string.

Made by @francoisbest.com & contributors

🔗 https://nuqs.dev
📦 nuqs@2.7.3 is out! 🚀

- bug fix when passing null to clear a key configured with parseAsArrayOf(...).withDefault([])

- parseAsBoolean is now case-insensitive
→ /?bool=TRUE does what you expect

Try it out: pnpm add nuqs@latest
November 7, 2025 at 9:42 PM
📦 nuqs has passed 1M weekly downloads on @npmjs.bsky.social 🚀

Thanks everyone! 🫶
October 29, 2025 at 11:57 AM
📦 nuqs@2.7.2 is out! 🚀

It includes a bug fix for debounce with `shallow: false` which sent unnecessary stale URL updates to the server.

Try it out: pnpm add nuqs@latest
October 16, 2025 at 11:46 AM
nuqs has passed 9k stars 🌟

Thank you everyone! 🫶
October 14, 2025 at 3:15 PM
📦 nuqs@2.7.1 is out! 🚀

Two rapid-fire PRs by @tkdodo.eu 🔥

- Fixed a bug with MultiParsers & history: push
- Prevent a re-render when doing setState(x => x) (same reference) in useQueryStates

Try it out: pnpm add nuqs@latest
October 6, 2025 at 7:17 PM
📦 nuqs@2.7.0 is out! 🚀

- MultiParsers: `parseAsNativeArrayOf`, and turn key repetition into Record, Map, Set, anything, with custom parsers. Thanks @tkdodo.eu ! 🙌

- Fixed a bug with flickering optimistic state on update

Try it out: pnpm add nuqs@latest
September 30, 2025 at 3:30 PM
📦 nuqs@2.7.0-beta.1 is out! 🚀

✨ MultiParsers allow transforming repeated keys in the URL into more complex data types. This had been a long-requested one, thanks @tkdodo.eu! 🫶

🧪 The testing adapter gets an optional memory to behave more closely to real frameworks.

Try it out: pnpm add nuqs@beta
September 26, 2025 at 9:36 PM
You can change this default globally at the adapter level if it makes more sense in your case:
September 19, 2025 at 9:49 PM
🔗 Introducing our new domain name: nuqs.dev

2 years ago, I restarted work on the useQueryState hook to support the @nextjs.org app router.

Since then, the project exploded:
⭐ +8k stars
📦 +30M downloads
👥 +50 contributors
🩷 +23 sponsors

Thank you, everyone! 🫶
September 6, 2025 at 1:42 PM
📦 nuqs@2.6.0 is out! 🚀

- ✨ `processUrlSearchParams` middleware: sort the querystring alphabetically (for SEO & cache) or process it before updating the URL.
- 💎 Zod codecs community parser
- ⚠️ Log a warning when using debounce with shallow: true with a link to docs

Try it out: pnpm add nuqs@latest
September 5, 2025 at 3:06 PM
📦 nuqs@2.5.2 is out! 🚀

It fixes a referential stability issue with the testing adapter. The state updater function is now stable across renders & state updates in test environments (@vitest.dev, Jest etc)

Try it out: pnpm add nuqs@latest
August 30, 2025 at 7:17 AM
📦 nuqs@2.5.1 is out! 🚀

🐞 It fixes a bug with @cloudflare.social Workers ("Disallowed operation called within global scope"), by lazily creating the throttle queue's AbortController.

TL;DR: you can ship on CFW again now. 🚀

Try it out: pnpm add nuqs@latest
August 25, 2025 at 2:00 PM
To address community feedback and questions, we've updated the Debounce docs to add clarifications.

TL;DR:
- Use debounce with `shallow: false` when doing server-side data fetching (RSCs, gSSP, loaders)
- For client-side fetching (React Query, SWR, tRPC), debounce the returned state instead.
August 24, 2025 at 1:41 PM
📦 nuqs@2.5.0-beta.7 is out! 🚀

Likely the last beta before shipping 2.5 🤘

- Adds more options to be specified as global defaults on the adapter
- Bundle reduction & deps: nuqs has now zero dependencies!

Follow @tkdodo.eu's advice and try it out:
> pnpm add nuqs@beta
August 21, 2025 at 11:46 AM
📦 nuqs@2.5.0-beta.5 is out! 🚀

It adds a couple of features:
- Change global defaults for options at the adapter level (thanks @tkdodo.eu! 🔥)
- Export package.json for @vite.dev module federation

Try it out: pnpm add nuqs@beta
August 14, 2025 at 3:09 PM
📦 nuqs@2.5.0-beta.4 is out! 🚀

It adds a couple of bug fixes:
- Type-safety of default values when using the object signature of useQueryState (thanks @tkdodo.eu 🙌)
- Better compat with older CJS codebases via require(esm)

Try it out: pnpm add nuqs@beta
August 13, 2025 at 3:45 PM
📦 nuqs@2.5.0-beta.3 is out! 🚀

It adds experimental support for @tanstack.com Router 🏝️🙌

- Use community-based nuqs components in TSR
- Connect nuqs parser definitions to TSR's validateSearch for type-safe linking*

Try it out: pnpm add nuqs@beta
August 8, 2025 at 1:36 PM
🌟 8k stars on @github.com, thank you everyone! 🙌
July 24, 2025 at 4:55 AM
📦 nuqs@2.5.0-beta.2 is out! 🚀

It adds a couple of features:

- Standard Schema generation: validate & infer types with other tools (tRPC, TanStack Router), using your existing search params definitions
- Strict mode for loaders & cache (see quoted post)

Try it out: pnpm add nuqs@beta
June 27, 2025 at 6:48 AM
📦 nuqs@2.5.0-beta.1 is out! 🚀

The first beta in the 2.5 release line just dropped, with Debounce support: perfect for search inputs, sliders, and server-side updates where you only care about a final value.

Also lots of internal changes, like fixing tearing issues.

Try it out: pnpm add nuqs@beta
June 11, 2025 at 7:28 PM
nuqs has joined the @vercel.com open source program! 🙌

More than the platform credits, the greatest value here will be access to the community, making sure we ship quality updates that benefit all.
May 9, 2025 at 7:17 PM
We've passed 7000 stars on GitHub!

🟣 Celebratory stream on Twitch today at 3pm CEST

We'll also play with Debounce, getting it ready for beta next week.

Come say hi! 👋
www.twitch.tv/fortysevenfx
April 15, 2025 at 10:48 AM
✨ Testing custom adapters

nuqs now exposes three functions to help test parsers bijectivity, making sure `parse` and `serialize` complement each other, losslessly.
February 17, 2025 at 1:59 PM
✨ `parseAsIndex` parser

Your UI should be consistent, and the URL is part of that. That "Page 2" button should give you `/?page=2`.

But unlike humans, JS arrays (and @tanstack.com table) like counting from zero.

Enter parseAsIndex, doing the translation for you.
February 17, 2025 at 1:59 PM
We have passed 6k stars on GitHub 🤩

Thank you everyone! 🙏 🚀
February 4, 2025 at 10:31 AM