Dynamic routes and the useParams
hook cause repeated rendering when parameters are not changed
#10580
Unanswered
mattiabonardi
asked this question in
Q&A
Replies: 0 comments
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.
-
Hi, I'm using the V7 and I don't understand why if I define a dynamic route (i.e path:
:id
) when I change route maintaining the same id theuseParams
hook causes re renders. I expect that theuseParams
don't trigger a new re render if the param is the same.When I navigate from child1 to child2 the layout component re render. Removing the
useParams
hook It can't re renders.Thank you so much
Beta Was this translation helpful? Give feedback.
All reactions