Recommended by Pro Trailblazer

nuqs

nuqs

Type-safe React hooks for URL search params that keep filter and pagination state in the address bar where it belongs.

nuqs

About

nuqs (formerly next-usequerystate) gives you useQueryState and useQueryStates hooks that read and write URL search params with full TypeScript inference and built-in parsers for strings, numbers, booleans, dates, JSON, and arrays. It supports Next.js App Router, Pages Router, React Router, Remix, and plain React, with adapters for each. State stays in the URL, so deep links, refreshes, and back-button navigation all work without you wiring up a single useEffect.

Highlights

  • Type-safe hooks with first-class parsers for primitives, dates, JSON, and arrays
  • Works with Next.js App Router and Pages Router, React Router, Remix, and plain React
  • Shareable, refresh-safe state by default, no extra effects to keep things in sync
  • Throttled history updates so rapid changes do not spam the browser history