-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
feat(rsc): add support for throwing redirect Response's at RSC render time #14596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 2df3cfb The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| "react-router": minor | ||
| --- | ||
|
|
||
| add support for throwing redirect Response's at RSC render time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be patch since RSC is still unstable right?
| !errorRedirectHandledMap.get(error) | ||
| ) { | ||
| // TODO: Handle external redirects? | ||
| setTimeout(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we useNavigate and an effect?
| window.__reactRouterDataRouter && | ||
| !errorRedirectHandledMap.get(error) | ||
| ) { | ||
| // TODO: Handle external redirects? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to take logic from Link or startRedirectNavigation and turn it into a utility
| * enables the unstable_useTransitions flag, as well as the ability to handle | ||
| * thrown redirect responses during the render phase. | ||
| */ | ||
| unstable_rsc?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be able to check for RSCRouterContext from the usage point and avoid prop drilling
No description provided.