Like useState, but stored in the URL query string.
Made by @francoisbest.com & contributors
🔗 https://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! 🫶
Conference-driven development is real.
Conference-driven development is real.
No big new feature, but a widening of the SemVer range for react-router{-dom} to include v5, as I need it in a client project.
Might be removed in nuqs@3.0.0, we'll see how support goes.
The adapter can be installed with the @shadcn.com CLI:
No big new feature, but a widening of the SemVer range for react-router{-dom} to include v5, as I need it in a client project.
Might be removed in nuqs@3.0.0, we'll see how support goes.
The adapter can be installed with the @shadcn.com CLI:
✨ Get notified when we drop a new adapter, parser or utility
🐞 or when we push updates & bug fixes
nuqs.dev/registry
It now contains community adapters, to one-command install nuqs in:
⛩️ Waku
🐘 Inertia
🥇 One.js
📱 Expo Router (coming soon)
✨ Get notified when we drop a new adapter, parser or utility
🐞 or when we push updates & bug fixes
nuqs.dev/registry
It now contains community adapters, to one-command install nuqs in:
⛩️ Waku
🐘 Inertia
🥇 One.js
📱 Expo Router (coming soon)
- 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
- 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
Go watch it, it contains two gems:
- The dangers and limits of URL state (to make you a better engineer)
- A live demo of how @nuqs.dev uses a declarative approach to type-safe and time-safe behaviours, in a composable way.
Go watch it, it contains two gems:
- The dangers and limits of URL state (to make you a better engineer)
- A live demo of how @nuqs.dev uses a declarative approach to type-safe and time-safe behaviours, in a composable way.
- parsers
- adapters
- little snippets that make more sense to vendor into your codebase & tweak as needed
First one is the utility I showed in my talk for type-safe linking (with typedRoutes) in @nextjs.org
- parsers
- adapters
- little snippets that make more sense to vendor into your codebase & tweak as needed
First one is the utility I showed in my talk for type-safe linking (with typedRoutes) in @nextjs.org
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
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
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
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
- 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
- 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
✨ 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
✨ 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
Catch up on last conf's unforgettable sessions:
➡️ Type Safe URL State Management in #React with nuqs -by- @francoisbest.com
🎞️ www.youtube.com/watch?v=U__R...
😉 See you next March 2026 👉🏽 react.paris
Catch up on last conf's unforgettable sessions:
➡️ Type Safe URL State Management in #React with nuqs -by- @francoisbest.com
🎞️ www.youtube.com/watch?v=U__R...
😉 See you next March 2026 👉🏽 react.paris
We managed to work around not using `useOptimistic` with hacks, but to properly support optimistic local state updates while the URL update is queued, with concurrent rendering & Suspense, we need to do it the right way.
We managed to work around not using `useOptimistic` with hacks, but to properly support optimistic local state updates while the URL update is queued, with concurrent rendering & Suspense, we need to do it the right way.
A lot of folks can't remember the name `nuqs`, but know what it's about, and can't find it with search terms.
Neither the docs, the GitHub repo, nor the NPM package page rank for some critical keywords.
A lot of folks can't remember the name `nuqs`, but know what it's about, and can't find it with search terms.
Neither the docs, the GitHub repo, nor the NPM package page rank for some critical keywords.
Open Source Stories S1E3
www.youtube.com/watch?v=9PJx...
Open Source Stories S1E3
www.youtube.com/watch?v=9PJx...
Because you're guaranteed to run @react.dev on the client, but not all frameworks do SSR.
With `shallow: false`, you opt-out of this client-only behaviour, and cross the network boundary for search params you need during SSR.
Because you're guaranteed to run @react.dev on the client, but not all frameworks do SSR.
With `shallow: false`, you opt-out of this client-only behaviour, and cross the network boundary for search params you need during SSR.
This is not BitTorrent.
It’s what you get from putting your app state in the URL.
This is not BitTorrent.
It’s what you get from putting your app state in the URL.
We'll cover a few tricks @nuqs.dev has up its sleeve to scale URL state in Next.js (some I yet need to finish building 😅).
So thankful for the opportunity 🙌
We'll cover a few tricks @nuqs.dev has up its sleeve to scale URL state in Next.js (some I yet need to finish building 😅).
So thankful for the opportunity 🙌
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! 🫶
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! 🫶
- ✨ `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
- ✨ `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