Skip to content

Conversation

Multiply
Copy link
Contributor

@Multiply Multiply commented Sep 2, 2025

No description provided.

Copy link

vercel bot commented Sep 2, 2025

@Multiply is attempting to deploy a commit to the 47ng Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Sep 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
nuqs Ready Ready Preview Comment Sep 2, 2025 7:16pm

@franky47
Copy link
Member

franky47 commented Sep 2, 2025

suggestion: A few things we could improve:

  • Add a QuerySpy to the demos, that only showcases that demo's URL keys (using the keepKeys prop). That'll help folks on mobile or in browsers where the URL is hidden by default (heresy!)
  • Move the note about copy vs in-place to the alphabetical sorting example (first occurrence)

@franky47 franky47 added this to the 🪵 Backlog milestone Sep 2, 2025
@franky47 franky47 added the documentation Improvements or additions to documentation label Sep 2, 2025
@Multiply
Copy link
Contributor Author

Multiply commented Sep 2, 2025

suggestion: A few things we could improve:

  • Add a QuerySpy to the demos, that only showcases that demo's URL keys (using the keepKeys prop). That'll help folks on mobile or in browsers where the URL is hidden by default (heresy!)
  • Move the note about copy vs in-place to the alphabetical sorting example (first occurrence)

I can't seem to get the <QuerySpy> to work outside of initial page load. It simply doesn't react to any state changes, regardless of it being used inside/outside of the <NuqsAdapter>.

@franky47
Copy link
Member

franky47 commented Sep 2, 2025

Ah yeah good point, it uses the Next.js APIs, but the demo is scoped in the React SPA. It's odd as Next.js usually picks up history changes made from other sources. I'll have a look later.

@franky47
Copy link
Member

franky47 commented Sep 2, 2025

I found the issue: Next.js only listens to external history API calls when the state passed is null, but the React SPA adapter maintains whatever it was before. I'll see if I can add an option in the React SPA adapter to control this behaviour.

Edit: actually, using the Next.js app router adapter (nested into itself) also works, which is fine for this case (in the nuqs 2.5 blog post it was to showcase key isolation, which behaves differently in both, but the API is the same on all adapters here).

@franky47 franky47 enabled auto-merge (squash) September 2, 2025 19:13
@franky47 franky47 merged commit 6f17458 into 47ng:next Sep 2, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants