Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow the serialize function in parsers to remove their key from the URL #770

Closed
wants to merge 1 commit into from

Conversation

franky47
Copy link
Member

@franky47 franky47 commented Nov 15, 2024

Returning null from the serialize function signals that the associated search param should be removed from the URL.

This would allow clearing invalid states passed to the serialize function.

Edit: this would actually count as a breaking change (the docs did break), so it will be added to the v3 release line.

Tasks

  • Add docs
  • Add tests

See related discussion.

…rom the URL

Returning `null` from the `serialize` function signals that
the associated search param should be removed
from the URL.
Copy link

vercel bot commented Nov 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nuqs ❌ Failed (Inspect) Nov 16, 2024 0:00am

Copy link

pkg-pr-new bot commented Nov 15, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/nuqs@770

commit: 6d6d930

@franky47
Copy link
Member Author

Closing for now, to be reopened for v3.

@franky47 franky47 added the 🧟 zombieland Closed PRs to be reopened later label Nov 20, 2024
@franky47 franky47 deleted the feat/nullable-serialize branch November 20, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/serializer 🧟 zombieland Closed PRs to be reopened later
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant