-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
Server-side clearOnDefault
and urlKeys
#679
Comments
The Regarding urlKeys, at the moment it's only implemented in useQueryStates (see #672), and I agree that having a single source of truth would be the best way. I'm not sure what kind of API that would look like, open to suggestions and PRs. |
I guess I'll export an object at that file with all of the configs for now. Would see some sort of "global" option or "parser-specific-global" option so that I don't need to pass around the same object over and over. |
Great work btw, been sponsoring you! |
Thank you for the sponsorship! 🙏
This is coming after V2 lands, in the form of overridable global defaults for options. The adapters (which are a context provider) will forward them to the hooks, so it should look something like:
Also please note that clearOnDefault will be set to true by default in V2, per user feedback. |
🎉 This issue has been resolved in version 2.1.0 🎉 The release is available on: |
Context
What's your version of
nuqs
?1.20.0
Next.js information (obtained by running
next info
):Are you using:
basePath
option in your Next.js configwindowHistorySupport
flag in your Next.js configDescription
How can I use
clearOnDefault
andurlKeys
? Or to be more precise, I want to have a one single-source-of-truth, next to, for example, this:The text was updated successfully, but these errors were encountered: