Fix (react-router) inconsistent handling of multiple consecutive redirects - #15392
Open
YogeshK05 wants to merge 3 commits into
Open
Fix (react-router) inconsistent handling of multiple consecutive redirects#15392YogeshK05 wants to merge 3 commits into
YogeshK05 wants to merge 3 commits into
Conversation
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.
This pull request addresses an issue where multiple consecutive redirects were not handled consistently between navigations and fetchers in the
react-routerpackage. The main change ensures that consecutive redirects triggered by fetcher submissions are processed correctly, and thatshouldRevalidatelogic is applied as expected. A new test has been added to verify this behavior.Bug fix #14450:
packages/react-router/.changes/patch.fix-multiple-consecutive-redirects-not-handled.md, packages/react-router/.changes/patch.fix-multiple-consecutive-redirects-not-handled.mdR1)fetcherSubmissioncontext tostartRedirectNavigationto properly handle consecutive redirects originating from fetcher submissions. (packages/react-router/lib/router/router.ts, packages/react-router/lib/router/router.tsR2519)Testing improvements:
shouldRevalidateis called correctly after consecutive redirects from a fetcher submission, ensuring the fix works as intended. (packages/react-router/__tests__/router/should-revalidate-test.ts, packages/react-router/tests/router/should-revalidate-test.tsR786-R836)