~/talk

Type Safe URL State Management in React with nuqs

Talkat React Paris 2025 Β· 2025-03-20..03-21Β· [react, typescript]
slides:none on file

nuqs is a small library that moves structured state into the URL with type-safe parsers and framework adapters (Next.js app router, React Router v7, Remix). Demo replaces useState with useQueryState for a count example and builds filters with createLoader and createSerializer; URL updates use the history API so clicks produce shallow routing (no network request) and server-aware reads still work. It throttles updates to avoid browser rate limits, maps friendly URL keys, and warns about ~2,000 char/8KB limits.

AI-written summary Β· about

  1. 0:00Introduction and setup
  2. 1:25What is URL state
  3. 3:14Superpowers of URL state
  4. 5:01Drawbacks of URL state
  5. 7:08Immutable URLs and schema migration
  6. 8:15Breaking the back button
  7. 8:59Rate limiting URL updates
  8. 10:02SEO and canonical URLs
  9. 11:06When to use URL state
  10. 12:28Introducing nuqs library
  11. 13:54Demo basic usage
  12. 16:44Shallow routing vs SSR
  13. 17:46Demo server-side rendering
  14. 20:59Connecting UI to URL state
  15. 23:53Customizing URL keys
  16. 26:23Handling breaking changes
  17. 27:05Generating URLs from state
  18. 28:15Stitching search params
  19. 28:56Recap and advanced features
  20. 30:20Resources and closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark β€” the status bar button does the same
?
this help
esc
close this, then clear every filter β€” or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.