-
Hi everyone |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Hi Amir, thanks for opening this discussion. Do you have a link to your implementation with react-router? One thing I'd love to be able to do eventually, is for the A non-exhaustive list of such frameworks would be:
One way to do this could be to provide the implementation (interfaces with each framework/router's APIs) via Context, but this introduces an additional step to integrate nuqs, and nuqs-aware components. Ideally, an automatic way that doesn't break locality of behaviour would be best: at import time, the correct implementation is selected and loaded. This shifts the problem/burden onto bundlers, which would add another additional level of complexity. Another issue is the options: some of them make sense in the context of a full-stack app with a server ready to receive updated search params in a request, and render an updated view. But most traditional React apps are SPAs without any form of SSR or BFF. This raises the question of what to do with the |
Beta Was this translation helpful? Give feedback.
I have opened a draft PR implementing adapters in #644. You can try a preview here (here be dragons):
You'll need to wrap your application in a
NuqsAdapter
, as such:Vanilla React (eg: with Vite):
Next.js, app router: