Give every match a loaders record - #810
Closed
pleek91 wants to merge 1 commit into
Closed
Conversation
Loaders are stored per match alongside views, so a route's data can be derived from its matches the same way its views are.
pleek91
force-pushed
the
loaders-on-matches
branch
from
August 3, 2026 17:47
d7ca09e to
736a826
Compare
pleek91
changed the base branch from
props-on-data-store
to
drop-dead-navigation-guard
August 3, 2026 17:47
Member
Author
|
Folded into #811 — the loaders record isn't useful on its own without the method that fills it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Third step of #805, stacked on #809. No behaviour changes — nothing reads these records yet.
Loaders are a route's data, declared the way views are declared but with no component attached and no hold on rendering. Storing them per match, alongside views, means a route's data can be derived from its matches the same way its views already are — including an ancestor's loaders, which a child should be able to use as its own.
route.datais that derivation: the loaders of every match combined, flattened to the loader's data directly when the only loader in the tree is unnamed. This PR adds the types and the empty record; the method that fills it and the store that runs it follow.