• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
stevekrouse

stevekrouse

nuqs-demo

Public
Like
nuqs-demo
Home
Code
4
App.tsx
README.md
index.html
new-file-4357.tsx
Branches
1
Pull requests
Remixes
1
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
6/24/2025
Viewing readonly version of main branch: v6
View latest version
README.md

Minimal nuqs Demo

A super simple demonstration of nuqs - a library for managing URL search parameters as React state.

What it shows

  • A text input that syncs with the URL search parameter name
  • Real-time URL updates as you type
  • State persistence on page refresh
  • Basic useQueryState hook usage

Key concepts

  • useQueryState('name') creates a state variable that syncs with ?name=value in the URL
  • The app is wrapped in NuqsAdapter to enable the functionality
  • Setting the state to null removes the parameter from the URL

Try it

  1. Type in the input field and watch the URL change
  2. Refresh the page - your input is preserved
  3. Manually edit the URL parameter and see the input update
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.