Skip to content

Add a global option to opt-out of shallow routing #856

Answered by franky47
nygmaaa asked this question in Ideas
Discussion options

You must be logged in to vote

Thanks for the report. nuqs@^1 did also patch the history methods, and so seems to work with your reproduction. If you are able in your project, can you try and install that version (1.20.0 is the latest in the ^1 line) and see if it works better? Note that there is no adapters in nuqs 1, so you'll have to remove it from your layout.tsx.

It might be possible to export the same enableHistorySync helper in Next.js that we need in React Router (and is optional in the React SPA adapter), to opt-in to patch the history methods and keep the same level of features (ie: not being stuck with shallow: false).

That being said, the issue should be raised with Zaraz and/or Next.js, because Zaraz break…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@nygmaaa
Comment options

@franky47
Comment options

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