react/scripts/flow
Rubén Norte bb0944fe5b
[RN] Use microtasks in the RN renderer based on a global flag defined by RN (#28472)
## Summary

We want to enable the new event loop in React Native
(https://github.com/react-native-community/discussions-and-proposals/pull/744)
for all users in the new architecture (determined by the use of
bridgeless, not by the use of Fabric). In order to leverage that, we
need to also set the flag for the React reconciler to use microtasks for
scheduling (so we'll execute them at the right time in the new event
loop).

This migrates from the previous approach using a dynamic flag (to be
used at Meta) with the check of a global set by React Native. The reason
for doing this is:
1) We still need to determine this dynamically in OSS (based on
Bridgeless, not on Fabric).
2) We still need the ability to configure the behavior at Meta, and for
internal build system reasons we cannot access the flag that enables
microtasks in
[`ReactNativeFeatureFlags`](6c28c87c4d/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js (L121)).

## How did you test this change?

Manually synchronized the changes to React Native and ran all tests for
the new architecture on it. Also tested manually.

> [!NOTE]
> This change depends on
https://github.com/facebook/react-native/pull/43397 which has been
merged already
2024-03-13 10:00:10 +00:00
..
config [flow] ignore hidden directories (#28096) 2024-02-01 11:24:04 -05:00
createFlowConfigs.js Upgrade Flow to 0.220.1 (#27680) 2023-11-09 10:53:08 -05:00
environment.js [Flight] Instrument the Console in the RSC Environment and Replay Logs on the Client (#28384) 2024-02-21 14:47:55 -05:00
react-devtools.js ESLint upgrade to use hermes-eslint (#25915) 2022-12-20 14:27:01 -05:00
react-native-host-hooks.js [RN] Use microtasks in the RN renderer based on a global flag defined by RN (#28472) 2024-03-13 10:00:10 +00:00
runFlow.js Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
xplat.js [RN] Use microtasks in the RN renderer based on a global flag defined by RN (#28472) 2024-03-13 10:00:10 +00:00