Performance Degradation in Routing (rerendering) #1460
Replies: 2 comments 1 reply
-
I am also facing the same issue. The entire page is reloading when any navigation link is clicked. |
Beta Was this translation helpful? Give feedback.
-
I am facing the same, or at least a similar problem. There needs to be a way to "silently" update search params without causing any rerenders or actual navigation. I want to reflect the state of some of my forms in the search params to make them shareable. The form itself is currently managed by react-hook-form and has the components cut specifically to keep rerenders small. Having the search param updates rerender the whole thing completely defeats the purpose of some of the things I do to avoid it. The TanStack router docs specifically mention and encourage putting state information into the search params multiple times. In fact, it is what drew me to it. However, this is not viable to do unless the search params can be updated without rerenders. Thinking about it, the whole Idea of "navigating" to only change the search params to reflect an internal state change seems off - there is no real navigation here, just an additional bit of user interface being updated. |
Beta Was this translation helpful? Give feedback.
-
I'm reaching out to report a performance issue.
The problem involves performance in two scenarios:
useNavigation
, the entire page, including all layout components and child components, is re-rendered.In the classic
react-router
package, this problem does not exist, there it works as expected, parts are rerendered as expected.Example Link: https://stackblitz.com/edit/vitejs-vite-ifxs98
Beta Was this translation helpful? Give feedback.
All reactions