Skip to content

How to detect query change using next/navigation in shallow mode #558

Answered by franky47
MantasJa asked this question in Q&A
Discussion options

You must be logged in to vote

What version of next are you using? The useSearchParams 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 reactive useSearchParams). This may or may not be of relevance for your application.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@MantasJa
Comment options

@franky47
Comment options

@MantasJa
Comment options

Answer selected by franky47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants