You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We got a pretty big app, one of our view has complex logic under one of routes. After testing, we noticed that adding parameter to search params causes to rerender whole app, which takes ~800ms.
In below screenshot we dont even utilize param stuff anywhere in the app but it still gets to be rerendered.
So I think what react-location lacks is the selectors that react-redux or zustand have, which allows to skip re-rendering if the selected slice is the same.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We got a pretty big app, one of our view has complex logic under one of routes. After testing, we noticed that adding parameter to search params causes to rerender whole app, which takes ~800ms.
In below screenshot we dont even utilize param
stuff
anywhere in the app but it still gets to be rerendered.Example code
and example with same onClick but with changing something using zustand
Conclusion
So I think what react-location lacks is the selectors that react-redux or zustand have, which allows to skip re-rendering if the selected slice is the same.
Am I right or I am missing something?
Tested on version
3.7.4
Beta Was this translation helpful? Give feedback.
All reactions