BASE

nuqs

nuqs

Web framework / library · Free

Typed React state in URL queries: it synchronizes filters and navigation with the page address and parameter parsing.

Also known as: 47ng/nuqs; react-state-url-manager

Resource illustration: nuqs

Open resource ↗

What you can use for free

Code and local use under MIT.

Paid features and costs

Computing resources, self-hosting, and external services are paid for separately if used.

Access and limitations

Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.

Use cases

  • Save React screen filters in the URL
  • Connect typed URL state to filters and page navigation

Example workflow

A possible workflow; this is not a report of hands-on testing.

Save React screen filters in the URL.

Before you start

  • Web application source code and the intended workflow.
  • The project's framework and runtime version.

Steps

  1. Define query parameters and parsing for each value.
  2. Connect typed URL state to filters and page navigation.
  3. Add real data and error handling; check the production build.

Check your result

  • The workflow works after a page refresh and with invalid data.
  • The bundle, server rendering, and supported browsers suit the project.

Choosing nuqs

Save React screen filters in the URL

Choose this when

  • Save React screen filters in the URL
  • Connect typed URL state to filters and page navigation

Requirements

  • Compatible React/router and the corresponding NuqsAdapter; parsers for every parameter.

Things to consider

  • Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.
  • Terms of use: MIT for the code; dependencies have separate licenses.
  • In Next.js, default client shallow updates do not rerun server rendering; shallow: false enables server notification. URL parameters are openly visible to users.

Frequently asked questions

What can you use for free in nuqs?

Code and local use under MIT.

What additional costs might arise with nuqs?

Computing resources, self-hosting, and external services are paid for separately if used.

What terms of use matter for nuqs?

MIT for the code; dependencies have separate licenses.

How do you get started with nuqs?

Define query parameters and parsing for each value. Connect typed URL state to filters and page navigation. Add real data and error handling; check the production build.

What should I configure in nuqs for filters and the browser Back button?

nuqs stores typed React state in the query string. Wrap the component tree in its router adapter; parsers handle strings, numbers, dates, and custom formats, while useQueryStates groups related keys. By default the URL replaces the current history entry; history: push creates separate steps for the Back button.

License

MIT for the code; dependencies have separate licenses.

MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.

License terms

Technologies and topics

  • nuqs
  • web
  • Development

Sources

Other resources