Closed renatoruk closed 11 months ago
This PR fixes handling query params for useLanguageQuery using dynamic routes.
Take this case for example. We have two pages, index.js and [id].js.
index.js
[id].js
The user first lands on / page and wants to go to /foo. The passedQuery would not be updated because it's not tracked inside dependencies array.
/
/foo
passedQuery
The tests were needed to be updated because query needs to be passed as reference to not be treated as a change.
Thank you for your contribution!
This PR fixes handling query params for useLanguageQuery using dynamic routes.
Take this case for example. We have two pages,
index.js
and[id].js
.The user first lands on
/
page and wants to go to/foo
. ThepassedQuery
would not be updated because it's not tracked inside dependencies array.The tests were needed to be updated because query needs to be passed as reference to not be treated as a change.