react/scripts
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
..
babel fix[devtools/ci]: fixed incorrect condition calculation for @reactVersion annotation (#26997) 2023-06-23 16:45:53 +01:00
bench Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
circleci [useFormState] Allow sync actions (#27571) 2023-10-31 23:32:31 -04:00
devtools chore[devtools/release-scripts]: update messages / fixed npm view com… (#26660) 2023-04-19 10:05:16 +01:00
error-codes [DOM] disable legacy mode behind flag (#28468) 2024-03-04 08:19:17 -08:00
eslint [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
eslint-rules Support Flow as expressions in ESLint rules (#27590) 2023-11-01 15:24:06 -04:00
flags Fix crash running yarn flags --sort flag (#28344) 2024-02-17 15:28:35 +01:00
flow [RN] Use microtasks in the RN renderer based on a global flag defined by RN (#28472) 2024-03-13 10:00:10 +00:00
git Remove leftover env variable logic in pre-commit hook 2015-09-01 14:35:47 -07:00
jest Remove invokeGuardedCallback and replay trick (#28515) 2024-03-11 20:17:07 -04:00
perf-counters [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
prettier [useFormState] Allow sync actions (#27571) 2023-10-31 23:32:31 -04:00
print-warnings Remove WARNINGS file from FB (#27820) 2023-12-08 16:21:15 -05:00
release Added windows powershell syntax to build scripts (#27692) 2023-11-16 11:35:43 +00:00
rollup [RN] Use microtasks in the RN renderer based on a global flag defined by RN (#28472) 2024-03-13 10:00:10 +00:00
shared Rename "shared subset" to "server" (#27939) 2024-01-16 19:58:11 -05:00
tasks Bug: yarn flow dom does not exist, so console should suggest yarn flow dom-node (#26213) 2023-02-21 21:30:34 +01:00
authors AUTHORS 2013-09-09 23:42:54 -07:00