mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
bb0944fe5b
## 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`](https://github.com/facebook/react-native/blob/6c28c87c4d5d8a9f5be5e02cd7d3eba5b4aaca8c/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
23 lines
911 B
JavaScript
23 lines
911 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
*/
|
|
|
|
declare module 'ReactNativeInternalFeatureFlags' {
|
|
declare export var alwaysThrottleRetries: boolean;
|
|
declare export var consoleManagedByDevToolsDuringStrictMode: boolean;
|
|
declare export var enableAsyncActions: boolean;
|
|
declare export var enableComponentStackLocations: boolean;
|
|
declare export var enableDeferRootSchedulingToMicrotask: boolean;
|
|
declare export var enableInfiniteRenderLoopDetection: boolean;
|
|
declare export var enableRenderableContext: boolean;
|
|
declare export var enableUnifiedSyncLane: boolean;
|
|
declare export var enableUseRefAccessWarning: boolean;
|
|
declare export var passChildrenWhenCloningPersistedNodes: boolean;
|
|
declare export var useModernStrictMode: boolean;
|
|
}
|