
"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."
"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."
Nuqs 2.5 introduces debounced URL updates via a new limitUrlUpdates option (replacing throttleMs) that supports both debouncing and throttling to reduce excessive history API calls during rapid input changes. Standard Schema generation now derives validation and parser schemas from search parameter definitions for interoperability with tools like tRPC and route schemas. Key isolation implements fine-grained subscriptions so only components whose specific query key changes will re-render, improving performance; core adapters for React SPA, React Router, Remix, and TanStack Router include this behavior. Next.js remains an exception due to a single URLSearchParams context; maintainers are collaborating to mitigate that. Experimental TanStack Router support and compatibility adapters were added.
Read at InfoQ
Unable to calculate read time
Collection
[
|
...
]