-
Hello guys, I would like to ask you how to detect query change using shallow routing and using next/navigation. This example does not work:
Next.js 14.0.1 Why do I need this? I have few input components used in a search component, and I would like to initiate a server action for updating search results in other component. But at the moment I can not detect route changes. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
What version of That being said, be aware that in |
Beta Was this translation helpful? Give feedback.
What version of
next
are you using? TheuseSearchParams
hook only started to become reactive to shallow updates in 14.1.1, IIRC.That being said, be aware that in
nuqs
, there will be two renders when setting a state: one with the internal state update, and one when the URL eventually updates (triggered by a reactiveuseSearchParams
). This may or may not be of relevance for your application.