mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
## 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
100 lines
3.8 KiB
JavaScript
100 lines
3.8 KiB
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
|
|
*/
|
|
|
|
import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags';
|
|
import typeof * as ExportsType from './ReactFeatureFlags.test-renderer.www';
|
|
|
|
export const debugRenderPhaseSideEffectsForStrictMode = false;
|
|
export const enableDebugTracing = false;
|
|
export const enableAsyncDebugInfo = false;
|
|
export const enableSchedulingProfiler = false;
|
|
export const enableProfilerTimer = __PROFILE__;
|
|
export const enableProfilerCommitHooks = __PROFILE__;
|
|
export const enableProfilerNestedUpdatePhase = __PROFILE__;
|
|
export const enableUpdaterTracking = false;
|
|
export const enableCache = true;
|
|
export const enableLegacyCache = true;
|
|
export const enableCacheElement = true;
|
|
export const enableFetchInstrumentation = false;
|
|
export const enableFormActions = true; // Doesn't affect Test Renderer
|
|
export const enableBinaryFlight = true;
|
|
export const enableTaint = true;
|
|
export const enablePostpone = false;
|
|
export const disableJavaScriptURLs = true;
|
|
export const disableCommentsAsDOMContainers = true;
|
|
export const disableInputAttributeSyncing = false;
|
|
export const disableIEWorkarounds = true;
|
|
export const enableScopeAPI = true;
|
|
export const enableCreateEventHandleAPI = false;
|
|
export const enableSuspenseCallback = true;
|
|
export const disableLegacyContext = false;
|
|
export const enableTrustedTypesIntegration = false;
|
|
export const disableTextareaChildren = false;
|
|
export const disableModulePatternComponents = true;
|
|
export const enableSuspenseAvoidThisFallback = true;
|
|
export const enableSuspenseAvoidThisFallbackFizz = false;
|
|
export const enableCPUSuspense = false;
|
|
export const enableUseMemoCacheHook = true;
|
|
export const enableUseEffectEventHook = false;
|
|
export const enableClientRenderFallbackOnTextMismatch = true;
|
|
export const enableComponentStackLocations = true;
|
|
export const enableLegacyFBSupport = false;
|
|
export const enableFilterEmptyStringAttributesDOM = true;
|
|
export const enableGetInspectorDataForInstanceInProduction = false;
|
|
export const enableRenderableContext = false;
|
|
|
|
export const enableRetryLaneExpiration = false;
|
|
export const retryLaneExpirationMs = 5000;
|
|
export const syncLaneExpirationMs = 250;
|
|
export const transitionLaneExpirationMs = 5000;
|
|
|
|
export const enableUseRefAccessWarning = false;
|
|
|
|
export const disableSchedulerTimeoutInWorkLoop = false;
|
|
export const enableLazyContextPropagation = false;
|
|
export const enableLegacyHidden = false;
|
|
export const forceConcurrentByDefaultForTesting = false;
|
|
export const enableUnifiedSyncLane = true;
|
|
export const allowConcurrentByDefault = true;
|
|
export const enableCustomElementPropertySupport = false;
|
|
|
|
export const consoleManagedByDevToolsDuringStrictMode = false;
|
|
|
|
export const enableTransitionTracing = false;
|
|
|
|
export const enableFloat = true;
|
|
|
|
export const useModernStrictMode = false;
|
|
export const enableDO_NOT_USE_disableStrictPassiveEffect = false;
|
|
export const enableFizzExternalRuntime = false;
|
|
export const enableDeferRootSchedulingToMicrotask = true;
|
|
|
|
export const enableAsyncActions = true;
|
|
|
|
export const alwaysThrottleRetries = true;
|
|
|
|
export const passChildrenWhenCloningPersistedNodes = false;
|
|
export const enableUseDeferredValueInitialArg = true;
|
|
export const disableClientCache = true;
|
|
|
|
export const enableServerComponentKeys = true;
|
|
export const enableServerComponentLogs = true;
|
|
export const enableInfiniteRenderLoopDetection = false;
|
|
|
|
export const enableRefAsProp = false;
|
|
export const disableStringRefs = false;
|
|
|
|
export const enableReactTestRendererWarning = false;
|
|
export const disableLegacyMode = false;
|
|
|
|
export const enableBigIntSupport = false;
|
|
|
|
// Flow magic to verify the exports of this file match the original version.
|
|
((((null: any): ExportsType): FeatureFlagsType): ExportsType);
|