TanStackT
TanStack2y ago
2 replies
near-sapphire

Why is parent route's loader triggered when children change

Example from the docs: https://tanstack.com/router/v1/docs/framework/react/examples/location-masking

If you go to /photos and then /photos/$photoId/modal, the parent loader is triggered every time, even though its state doesn't change:

Why is that? Is that a bug?
image.png
An example showing how to implement Location Masking in React Router
Was this page helpful?