Skip to content
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

Fix single fetch revalidation bug on reused routes #13105

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

brophdawg11
Copy link
Contributor

No description provided.

Copy link

changeset-bot bot commented Feb 24, 2025

🦋 Changeset detected

Latest commit: 5d7b373

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
react-router Patch
@react-router/architect Patch
@react-router/cloudflare Patch
@react-router/dev Patch
react-router-dom Patch
@react-router/express Patch
@react-router/node Patch
@react-router/serve Patch
@react-router/fs-routes Patch
@react-router/remix-routes-option-adapter Patch
create-react-router Patch

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

// Short circuit if we have no loaders to run, unless there's a custom dataStrategy
// since they may have different revalidation rules (i.e., single fetch)
if (
!init.dataStrategy &&
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes issues with our "don't revalidate on action 4xx/5xx responses" logic since both scenarios result in a dataStrategy with all matches having shouldLoad: false. We may need to expose some more info to dataStrategy (or potentially just let dataStrategy handle all of the getMatchesToLoad logic)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant