Nuqs, the type-safe URL state manager for React, has recently released a bunch of new features across its recent releases, delivering a set of long awaited capabilities such as debounced URL updates, standardized schema interoperability, more granular re-render control, and experimental router integrations.
A standout feature is debounce support for URL updates. Previously, Nuqs relied on throttling via the throttleMs
attribute to rate-limit history API calls. Usage could lead to excessive requests during fast input changes such as search inputs. There is a new attribute called limitUrlUpdates
(which replaces the existing throttleMs option), and accepts a debounce:
const [search, setSearch] = useQueryState('search', {
defaultValue: '',
shallow: false,
limitUrlUpdates: debounce(250)
});
The existing throttleMs
option is deprecated in favor of the consolidated limitUrlUpdates
strategy, which allows both throttling and debouncing modes.
Standard Schema generation is possible from v2.5. Nuqs now lets you derive a validation / parser schema from your search param definitions, enabling integration with tools like tRPC or route schemas.
Key isolation introduces performance improvements through fine grained subscriptions. Previously, any change to the URL would cause all components using useQueryState
to re-render, since the shared URL object changed reference. In v2.5, Nuqs now avoids that as components only re-render when their specific key changes. This behavior is baked into the core adapters for React SPA, React Router, Remix, and TanStack Router. Notably, Next.js is an exception due to internal use of a single URLSearchParams context that always changes references. Nuqs maintainers mention ongoing collaboration with Next.js to mitigate this.
Nuqs 2.5 also adds experimental TanStack Router support. A compatibility adapter allows Nuqs-managed URL state to live alongside TanStack Router’s routing logic, and the Standard Schema interface helps tie URL state definitions to route validation. While feature parity is limited, this opens the door for monorepos or shared logic across React frameworks.
The release also includes a number of quality-of-life updates, exported package.json
support for module federation, more global default options for adapters, and better type inference for default values. It is also noted that Nuqs is now a ‘zero runtime dependencies’ library and despite the new features, it is under 5.5kb in size.
More recently, in the smaller 2.6 release, several enhancements have been added. The new processUrlSearchParams hook allows developers to intercept and transform URLSearchParams. A new warning message will also now be shown when shallow:true
is used with debounce.
A user on threads commented on the 2.5.0 release, highlighting the new features:
[email protected] is so beast. Debounce, Standard Schema, Key isolation, TanStack Router support.
Nuqs is an open-source project focused on making URL query parameters first-class state in React applications. It provides a useQueryState
hook that mirrors useState
semantics, with type safety, serialization/parsing, and server/client coordination built in. With version 2.5, Nuqs deepens its integration with schema tooling, gives developers more control over update behavior, and reduces unnecessary rerenders via isolation, all while laying groundwork for better routing interoperability.