Skip to content

SPA Mode should not use Single Fetch revalidation behavior #12740

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

Closed
brophdawg11 opened this issue Jan 14, 2025 · 5 comments · Fixed by #12948
Closed

SPA Mode should not use Single Fetch revalidation behavior #12740

brophdawg11 opened this issue Jan 14, 2025 · 5 comments · Fixed by #12948
Labels

Comments

@brophdawg11
Copy link
Contributor

brophdawg11 commented Jan 14, 2025

The Single Fetch revalidation behavior (de-optimization) is incorrectly being applied when in SPA mode and there is no "single fetch" to the server. SPA Mode should receive the default revalidation behavior optimizations where parent routes do not revalidate on GET navigations by default (unless path params or search params change)

I'm using React Router as a...

framework

Reproduction

  • Create an app in SPA mode (ssr: false) suing nested routes with loaders.
  • Route from one child route to another (/parent/a -> /parent/b)

Expected Behavior

The parent loader should not re-run by default

Actual Behavior

The parent loader should re-runs by default

@brophdawg11 brophdawg11 self-assigned this Jan 14, 2025
@mrtinsvitor
Copy link

mrtinsvitor commented Jan 16, 2025

This looks similar to the issue I was having, #12427. Would be great if it could get fixed 🙏

@nakah
Copy link

nakah commented Jan 21, 2025

Same issue here. However, as I'm using react-query inside the clientLoader, no query is sent to the network thanks to its internal caching mecanism.

@brophdawg11
Copy link
Contributor Author

This is fixed by #12948 and will be available in the next release

@brophdawg11 brophdawg11 linked a pull request Feb 12, 2025 that will close this issue
1 task
@brophdawg11 brophdawg11 removed their assignment Feb 12, 2025
@brophdawg11 brophdawg11 added the awaiting release This issue has been fixed and will be released soon label Feb 12, 2025
Copy link
Contributor

🤖 Hello there,

We just published version 7.2.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@brophdawg11 brophdawg11 removed the awaiting release This issue has been fixed and will be released soon label Feb 19, 2025
Copy link
Contributor

github-actions bot commented Mar 6, 2025

🤖 Hello there,

We just published version 7.3.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

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

Successfully merging a pull request may close this issue.

3 participants