Q: Why do we need a new API? instead of render/hydrate+unmountComponentAtNode A: reactwg/react-18#5 (comment)
- Existing act() issues
- Bug: act warning misleading if an effect wasn't run
- Should act() warnings be deduplicated by component stack?
Bug: error in effect cleanup function no longer catchableFlush discrete updates immediately in a batched context- testing build (facebook/react#19745, facebook/react#18196)
setup mock scheduler in a fresh cra throws "messageParent" can only be used inside a workerscheduler/unstable_mock will be obsolete
-
await act()
required for discrete events (reactwg/react-18#23) - Mocking scheduler requires setup and only a solution in jest exists (reactwg/react-18#23 (reply in thread)
-In Concurrent or Sync modes +In Concurrent React
- facebook/react#21765
- hydrate on the server? https://github.com/eps1lon/react/blob/2bf4805e4bd63dab45cd7f5e1ad32ef8fed3f6ab/packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js#L1281-L1299
-
From the meeting on 2021-06-25 regarding levels: If we are level 3 compatible should we already start wrapping setState calls in
startTransition
(e.g. TextField onChange)?Ideally almost every update should be wrapped in a transition somehow.