swr icon indicating copy to clipboard operation
swr copied to clipboard

Skip revalidation for RSC fallback data by default

Open dcondrey opened this issue 8 months ago • 2 comments

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

dcondrey avatar Apr 17 '25 10:04 dcondrey

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.

codesandbox-ci[bot] avatar Apr 17 '25 10:04 codesandbox-ci[bot]

Is there something I need to do?

dcondrey avatar May 24 '25 09:05 dcondrey