How to change URL query parameters without rerendering client component? #60080
Unanswered
arepp23
asked this question in
App Router
Replies: 3 comments 3 replies
-
Did you find a workaround? @arepp23 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Use this instead
|
Beta Was this translation helpful? Give feedback.
2 replies
-
for appRouter, use from the doc:
window.history.replaceState({}, '', `/some-path?query=xxx`) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Related to this issue which was never solved.
I have a search box which updates the
?query=
query param when a user types a value. The goal is to have the table on the page update based on the query given.This works fine when it's used inside of a server component, as changing the query params doesn't cause a full rerender of the server component. However, when used inside a client component, the whole client component rerenders when the search box is updated, which is not desirable behavior. Is there a way around this?
Beta Was this translation helpful? Give feedback.
All reactions