When route component gets rendered? #1351
Closed
Dragomir-Ivanov
started this conversation in
General
Replies: 1 comment 15 replies
-
Can you show a minimal reproduction because afaik this shouldn't happen |
Beta Was this translation helpful? Give feedback.
15 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Greetings,
Trying to wrap my mind around TSR, and against my use-case. I am using search params, and it seems that the whole route component is re-rendered when search param get changes. This is not intuitive and causes a lot of head scratching.
Given how these params are accessed via
useSearch
hook, wouldn't it more logical this hook to trigger the rerender of possibly only needed component, instead of the whole root component.If the present behaviour is really intentional, is there any React recipe how to focus re-rendering only where it is needed, instead of the whole route component.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions