-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit d6a77e1
authored
refactor(router-core): flatten loadMatches (#4961)
This PR *should* be a no-op. Just restructuring the code to have all the
functions used by `loadMatches` at the same level, instead of nested
callbacks. In order to still have access to the data that was previously
in scope because of nesting, we use a `innerLoadContext` object, which
is basically just the arguments of `loadMatches`, and a few mutables.
However, in order to do so, we have to rearrange promises in an area
that is sensitive to any microtask order change, and we did change some
of them. So this is not *really* a no-op, even though this does not
attempt any optimization.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- New Features
- Smoother navigations with predictable pending states and minimum
display durations.
- More consistent head/meta updates after route loading.
- Bug Fixes
- More reliable redirects and 404 handling, including during preloading
and SSR.
- Reduced UI flicker by refining pending and preloading behavior.
- Refactor
- Reworked the routing load pipeline for improved performance,
stability, and SSR behavior.
- Streamlined before-load steps for clearer, more consistent execution.
- Tests
- Updated tests to reflect the new loading flow.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 0df9067 commit d6a77e1Copy full SHA for d6a77e1
File tree
Expand file treeCollapse file tree
2 files changed
+824
-686
lines changedFilter options
- packages
- router-core/src
- solid-router/tests
Expand file treeCollapse file tree
2 files changed
+824
-686
lines changed
0 commit comments