Skip to content
Discussion options

You must be logged in to vote

As per https://nextjs.org/docs/routing/shallow-routing#caveats

Shallow routing only works for same page URL changes. For example, let's assume we have another page called pages/about.js, and you run this:

Router.push('/?counter=10', '/about?counter=10', { shallow: true })

Since that's a new page, it'll unload the current page, load the new one and wait for data fetching even though we asked to do shallow routing.

Replies: 7 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by Janpot
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@sfw185
Comment options

@ImTemporaryHere
Comment options

@7assenTlili
Comment options

@mzeinh
Comment options

@patrykcieszkowski
Comment options

Comment options

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

@magicqiang
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet