Files
react/packages
Andrew Clark 1102224bbb Fix: flushSync changes priority inside effect (#21122)
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.
2021-03-28 16:50:30 -07:00
..
2020-10-20 21:41:18 +01:00
2020-11-12 00:36:00 +00:00