Problem
Applications can replace routeTree while existing, pending, or cached matches still reference routes removed from the new tree.
Route lookups through looseRoutesById[match.routeId] then return undefined. This can crash cache cleanup, Devtools age rendering, and lifecycle callback dispatch.
Scope
- Evict cached matches whose route no longer exists during
clearExpiredCache.
- Make Devtools
AgeTicker render nothing for an orphaned match.
- Skip lifecycle callback dispatch for matches whose route has been removed.
- Preserve existing behavior for current routes and for routes without loaders.
- Add router-core regression coverage that loads a route, replaces the route tree without it, and completes a navigation or cache-cleanup cycle without throwing.
- Add focused Devtools coverage for an orphaned match in
AgeTicker.
Related Work
Problem
Applications can replace
routeTreewhile existing, pending, or cached matches still reference routes removed from the new tree.Route lookups through
looseRoutesById[match.routeId]then returnundefined. This can crash cache cleanup, Devtools age rendering, and lifecycle callback dispatch.Scope
clearExpiredCache.AgeTickerrender nothing for an orphaned match.AgeTicker.Related Work