T
TanStack17mo ago
absent-sapphire

Does navigation cause wasteful re-renders?

Hi, looking to migrate from react-router. One of the biggest issues with react-router is that it has alot of wasteful re-renders. This is due to navigation state and the Contexts used. There are many issues on their github but this one seems to sum it up https://github.com/remix-run/react-router/issues/7634 . There does not seem to be any priority to address this by the maintainers there despite many people experiencing this.
GitHub
useNavigate hook causes waste rendering · Issue #7634 · remix-run/r...
Version 6.0.0-beta.0 Test Case I create a pure component, there is no reason to execute again when i want to navigate to other page using useNavigate , I think useNavigate hook cause waste renderin...
1 Reply
yelping-magenta
yelping-magenta17mo ago
Shouldn't be an issue with tanstack router. You can use select on most hooks - it's a real state manager with fine grained re-renders

Did you find this page helpful?