-
Notifications
You must be signed in to change notification settings - Fork 47.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Fix: flushSync changes priority inside effect (#21122)"
This reverts commit 0e3c7e1. When called from inside an effect, flushSync cannot synchronously flush its updates because React is already working. So we fire a warning. However, we should still change the priority of the updates to sync so that they flush at the end of the current task. This only affects useEffect because updates inside useLayoutEffect (and the rest of the commit phase, like ref callbacks) are already sync.
- Loading branch information
Showing
3 changed files
with
22 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 0 additions & 64 deletions
64
packages/react-reconciler/src/__tests__/ReactFlushSync-test.js
This file was deleted.
Oops, something went wrong.