Skip to content

Commit 802cec5

Browse files
committed
Remove automatic fetch cache instrumentation (#28896)
This removes the automatic patching of the global `fetch` function in Server Components environments to dedupe requests using `React.cache`, a behavior that some RSC framework maintainers have objected to. We may revisit this decision in the future, but for now it's not worth the controversy. Frameworks that have already shipped this behavior, like Next.js, can reimplement it in userspace. I considered keeping the implementation in the codebase and disabling it by setting `enableFetchInstrumentation` to `false` everywhere, but since that also disables the tests, it doesn't seem worth it because without test coverage the behavior is likely to drift regardless. We can just revert this PR later if desired. DiffTrain build for [a94838d](a94838d)
1 parent f007da7 commit 802cec5

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9f2eebd807bf53b7d9901cf0b768762948224cae
1+
a94838df1c598a3993316ff453c84f3688537a97

compiled/facebook-www/__test_utils__/ReactAllWarnings.js

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)