How to Implement useQueryState
Similar to Nuqs
#4140
sagardwivedi
started this conversation in
General
Replies: 1 comment 1 reply
-
Hi, I'm the author of nuqs, FYI we have a PR to support TanStack Router: 47ng/nuqs#953. Feedback on it would be welcome! There are a few differences between nuqs & TSR:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on implementing a
useQueryState
hook that is similar in functionality to Nuqs but utilizing@tanstack/react-router
for handling query parameters. The implementation involves aParser
utility for parsing and stringifying different data types (string, number, boolean) and a hook that syncs state with query parameters.Here is the current implementation:
I would like feedback on the following:
Additionally, my current implementation is throwing type errors, particularly related to the parser logic and the handling of search parameters. Any insights into resolving these type issues while maintaining the intended functionality would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions