You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey guys!
Awesome lib, heavily rely on it in our mid-size nextjs app.
I recently rewritten it with App router approach and used intercepted route pattern.
Works great in general but this two patterns (intercepted routes and query state) are conflicting now.
For example I have a list: https://customuse.com/collections/roblox?orderBy=popularity&isRemix=true, state is in url.
When I click on any item in the list, url is changed to /d/:id and modal window is opened.
Problem is that query params are cleared at this point and list is re-rendered in background with default filters while modal is opened.
For now I solved it with useFilters hook with state in context that now is the source of truth, and query params are used only for cold start. So it works properly on example above.
Idk if its even possible to address this issue on library level, but decided to ask for advice either way)
Really like this awesome DX experience on relying only on nuqs, without any contexts and providers.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey guys!
Awesome lib, heavily rely on it in our mid-size nextjs app.
I recently rewritten it with App router approach and used intercepted route pattern.
Works great in general but this two patterns (intercepted routes and query state) are conflicting now.
For example I have a list:
https://customuse.com/collections/roblox?orderBy=popularity&isRemix=true
, state is in url.When I click on any item in the list, url is changed to
/d/:id
and modal window is opened.Problem is that query params are cleared at this point and list is re-rendered in background with default filters while modal is opened.
For now I solved it with useFilters hook with state in context that now is the source of truth, and query params are used only for cold start. So it works properly on example above.
Idk if its even possible to address this issue on library level, but decided to ask for advice either way)
Really like this awesome DX experience on relying only on nuqs, without any contexts and providers.
Beta Was this translation helpful? Give feedback.
All reactions