Skip to content

Skip revalidation for RSC fallback data by default #4119

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dcondrey
Copy link

Add configuration option revalidateOnRSCFallback (default: false) to eliminate redundant network request since data is already fresh when using SWR with RSC.

Changes

  • Added configuration option revalidateOnRSCFallback to PublicConfiguration
  • Updated revalidation logic to detect fallback data from RSC context
  • Set default value to false
  • Added test

Related Issues

Fixes #4065

Add configuration option to skip revalidation when data comes from RSC fallback
For data coming from RSC fallback, respect revalidateOnRSCFallback option
Add revalidateOnRSCFallback default value
Create a test file to verify revalidateOnRSCFallback
@dcondrey dcondrey requested review from shuding and huozhi as code owners April 17, 2025 10:53
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

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

Successfully merging this pull request may close these issues.

Feature request: when RSC data fetching set as the fallback, skip onmount revalidation
1 participant