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
{{ message }}
Repository navigation
useLoaderData causes component to render twice after loader run #4054
I'm writing a page that shows the list of posts with the filters that are taken from the search parameters. On every search parameters change the route should reload with a new (filtered) list of posts, but instead it reloads twice.
This no longer reproduces on current main. I tested the same setup with an async loader keyed by search-derived loaderDeps: changing the search parameter ran the loader once and rendered the useLoaderData consumer once.
The current per-match reactivity was introduced as part of #6704, which prevents loader-data consumers from being updated by unrelated Router state changes.
I’m going to close this as fixed. If you still see the extra render on the latest Router version, please open a new issue with an updated reproduction and we can compare the exact render sequence.
Activity
LadyBluenotes commentedon Jul 13, 2026
This no longer reproduces on current main. I tested the same setup with an async loader keyed by search-derived
loaderDeps: changing the search parameter ran the loader once and rendered theuseLoaderDataconsumer once.The current per-match reactivity was introduced as part of #6704, which prevents loader-data consumers from being updated by unrelated Router state changes.
I’m going to close this as fixed. If you still see the extra render on the latest Router version, please open a new issue with an updated reproduction and we can compare the exact render sequence.