Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update URL params without re-rendering the entire app? #457

Open
tmatek opened this issue Mar 6, 2021 · 0 comments
Open

Update URL params without re-rendering the entire app? #457

tmatek opened this issue Mar 6, 2021 · 0 comments

Comments

@tmatek
Copy link

tmatek commented Mar 6, 2021

First of all, thanks for this great package! We have a use case where we filter a list of items via search input and store that filter in query parameters in the URL, so users can share the filtered view. Now we expected only the components that depend on useLocation to re-render, but it seems the entire router is re-rendered? (and as a consequence, the entire sub-tree). Here is a codesandbox to demonstrate the issue: https://codesandbox.io/s/red-dawn-94de9

Is there a way to update query parameters without causing a re-render of entire tree?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant