-
Notifications
You must be signed in to change notification settings - Fork 11
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
support atomWithQuery
#20
Comments
Is it for "searchParams"? We have some discussions in #9. I don't have bandwidth to work on it. Would you or anyone be willing to do? |
I think it's a little different. In next.js, query could be other things. Like |
I see, location path patterns, I'd say. Maybe, Same applies 👇
|
I'm trying to achieve it this way: |
So I was able to run that one with a useMemo in a component, but not as an atom in a separated file. Importing Router generates too many problems. For instance even if Router is true, Router.isReady can potentially throw an error... So I did a workaround by creating a component in the _app.tsx that subscribes to router=useRouter() changes and updates an atom on each change. Then i can use that atom everywhere. I hope there is a way to add atomWithLocationQuery or atomWithRouter somehow! |
Replied there, but maybe we should continue discussion here? Or open a new one. |
No description provided.
The text was updated successfully, but these errors were encountered: