Repository navigation
Add opt-in application-controlled route discovery - #15602
Merged
Merged
Conversation
Contributor
Preview Build AvailablePreview builds have been created for this PR. You can install pnpm install "remix-run/react-router#preview/pr-15602&path:packages/react-router"And/or install other packages via: pnpm install "remix-run/react-router#preview/pr-15602&path:packages/react-router-dev"
pnpm install "remix-run/react-router#preview/pr-15602&path:packages/react-router-express"
pnpm install "remix-run/react-router#preview/pr-15602&path:packages/react-router-node"
pnpm install "remix-run/react-router#preview/pr-15602&path:packages/react-router-serve"These preview builds will be updated automatically as you push new commits. |
Contributor
|
The preview branch |
Merged
Contributor
|
π€ Hello there, We recently published version Thanks! |
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.
Implement RFC #15590 with
unstable_useRouteDiscoveryin conventional Framework Mode. Applications can discover selected destinations, load their running build's complete route manifest, and control recovery when incremental discovery encounters a different manifest version.Enable the opt-in in
react-router.config.ts:Full-manifest loading downloads route metadata and preserves the running client version. Deployments must retain that version's assets and compatible server contracts. Load failures remain catchable without rendering a route error boundary.
Custom callbacks override the corresponding defaults, compose in reverse registration order, and can explicitly invoke built-in recovery through
defaultBehavior(). If recovery leaves discovery incomplete, pending navigations and fetchers cancel without replaying submissions. Back/Forward cancellation restores a single pending traversal; overlapping native traversals during restoration remain a documented limitation.The flag selects the new eager, navigation, and fetcher discovery paths and gates the associated router cancellation behavior.
HydratedRouterconditionally calls the existing or custom hook based on the static flag, preserving the original render tree. The existing fog-of-war implementation is unchanged. Excluding the new code from flag-off bundles is deferred.Authored by an AI agent on behalf of @brophdawg11