nuqs
Syncs React state with URL search parameters in a type-safe manner.
A type-safe state management library for React that syncs component state with URL search parameters, solving the problem of managing URL query strings manually. It targets software developers building React applications, including those using Next.js, Remix, React Router, and TanStack Router. It is delivered as an open-source library with a familiar useState-like API, built-in parsers, and support for server components.
Key features
- End-to-end type safety between Server and Client components
- Supports Next.js, React SPA, Remix, React Router, TanStack Router
- Familiar React.useState-like API syncing with URL
- Built-in parsers and serializers for common state types
- History controls: replace or append navigation history
- useQueryStates hook for managing multiple keys
- Shallow updates by default, opt-in server re-render
- Type-safe search params access in nested React Server Components
- Support for useTransition to get loading states
- Customizable parsers and serializers
- Tiny: only 5.9kB gzipped
- Tested against every Next.js release
- No social media activity within the last 30 days
GTM channels
- Blog
- Newsletter
- Marketplace
- Community
- Docs
- Changelog
ICP
- Software developers
- Engineering teams
- Startups