Skip to content

doc: use URLSearchParams.sort#1113

Merged
franky47 merged 5 commits into47ng:nextfrom
Multiply:feat/process-url-search-params
Sep 2, 2025
Merged

doc: use URLSearchParams.sort#1113
franky47 merged 5 commits into47ng:nextfrom
Multiply:feat/process-url-search-params

Conversation

@Multiply
Copy link
Contributor

@Multiply Multiply commented Sep 2, 2025

No description provided.

@vercel
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.

@vercel
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
@github-actions
Copy link

github-actions bot commented Sep 4, 2025

🎉 This PR is included in version 2.6.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Sep 5, 2025

🎉 This PR is included in version 2.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@franky47 franky47 removed this from the 🚀 Shipping next milestone Sep 5, 2025
@franky47 franky47 mentioned this pull request Aug 30, 2025
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 released on @beta released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants