Skip to content
Discussion options

You must be logged in to vote

Because changing the query string means changing the URL then the correct behavior is to request the loaders.

But there's a built-in solution, using unstable_shouldReload you can check if what changed was the query string and prevent the request (this runs client-side).

That is the correct way to prevent this, and you will need to export that function on every route that may be called by Remix when the query change on your URL, so your route and their parents or child routes.

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@nickhow83
Comment options

Comment options

You must be logged in to vote
1 reply
@giopetris
Comment options

Comment options

You must be logged in to vote
6 replies
@sergiodxa
Comment options

@meglio
Comment options

@kiliman
Comment options

@kiliman
Comment options

@meglio
Comment options

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