Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Dynamic Feature Flags for React Native #28527

Merged
merged 1 commit into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ import typeof * as DynamicFlagsType from 'ReactNativeInternalFeatureFlags';
// update the test configuration.

export const alwaysThrottleRetries = __VARIANT__;
export const consoleManagedByDevToolsDuringStrictMode = __VARIANT__;
export const enableAsyncActions = __VARIANT__;
export const enableComponentStackLocations = __VARIANT__;
export const enableDeferRootSchedulingToMicrotask = __VARIANT__;
export const enableInfiniteRenderLoopDetection = __VARIANT__;
export const enableRenderableContext = __VARIANT__;
export const enableUnifiedSyncLane = __VARIANT__;
export const enableUseRefAccessWarning = __VARIANT__;
export const passChildrenWhenCloningPersistedNodes = __VARIANT__;
export const useMicrotasksForSchedulingInFabric = __VARIANT__;
export const enableUnifiedSyncLane = __VARIANT__;
export const enableInfiniteRenderLoopDetection = __VARIANT__;
export const useModernStrictMode = __VARIANT__;

// Flow magic to verify the exports of this file match the original version.
((((null: any): ExportsType): DynamicFlagsType): ExportsType);
13 changes: 6 additions & 7 deletions packages/shared/forks/ReactFeatureFlags.native-fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ import * as dynamicFlags from 'ReactNativeInternalFeatureFlags';
// the exports object every time a flag is read.
export const {
alwaysThrottleRetries,
consoleManagedByDevToolsDuringStrictMode,
enableAsyncActions,
enableComponentStackLocations,
enableDeferRootSchedulingToMicrotask,
enableInfiniteRenderLoopDetection,
enableRenderableContext,
enableUnifiedSyncLane,
enableUseRefAccessWarning,
passChildrenWhenCloningPersistedNodes,
useMicrotasksForSchedulingInFabric,
enableUnifiedSyncLane,
enableInfiniteRenderLoopDetection,
useModernStrictMode,
} = dynamicFlags;

// The rest of the flags are static for better dead code elimination.
Expand Down Expand Up @@ -67,7 +71,6 @@ export const enableClientRenderFallbackOnTextMismatch = true;
export const enableLegacyFBSupport = false;
export const enableFilterEmptyStringAttributesDOM = true;
export const enableGetInspectorDataForInstanceInProduction = true;
export const enableRenderableContext = false;

export const enableRetryLaneExpiration = false;
export const retryLaneExpirationMs = 5000;
Expand All @@ -81,17 +84,13 @@ export const forceConcurrentByDefaultForTesting = false;
export const allowConcurrentByDefault = false;
export const enableCustomElementPropertySupport = true;

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 = true;

export const enableAsyncActions = false;
export const enableUseDeferredValueInitialArg = true;
export const disableClientCache = true;

Expand Down
8 changes: 6 additions & 2 deletions scripts/flow/xplat.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@

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 useMicrotasksForSchedulingInFabric: boolean;
declare export var enableUnifiedSyncLane: boolean;
declare export var enableInfiniteRenderLoopDetection: boolean;
declare export var useModernStrictMode: boolean;
}