T
TanStack11mo ago
xenial-black

Render optimizations with loader/deps

Hey, I'm trying to understand the render optimizations with the fine-grained selectors. I noticed that as soon as you add loader deps this breaks. Changing loader deps will re-run the loader with a cause value of enter and everything will re-render. Here a StackBlitz: https://stackblitz.com/edit/tanstack-router-b7z2d8?file=src%2Froutes%2Findex.tsx Is this intended behavior?
Fynn Path
StackBlitz
Router Quickstart File Based Example (forked) - StackBlitz
Run official live example code for Router Quickstart File Based, created by Tanstack on StackBlitz
3 Replies
sensitive-blue
sensitive-blue11mo ago
not sure really it should at least not have cause: "enter" i would expect cause: "stay" but I see where this is coming from can you please create a github issue so we can track this?
xenial-black
xenial-blackOP11mo ago
yes I will create one, thanks
xenial-black
xenial-blackOP11mo ago
GitHub
Route loader gets triggered with 'enter' cause when loader deps are...
Which project does this relate to? Router Describe the bug I was trying to understand render optimization when discovering this potential bug. In the stackblitz you see a stable and a mutating valu...

Did you find this page helpful?