Skip to content

Commit

Permalink
Add dynamic flag for infinite loop detection on React Native FB
Browse files Browse the repository at this point in the history
  • Loading branch information
kassens committed Feb 29, 2024
1 parent fb10a2c commit 5cd1339
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const enableUseRefAccessWarning = __VARIANT__;
export const passChildrenWhenCloningPersistedNodes = __VARIANT__;
export const useMicrotasksForSchedulingInFabric = __VARIANT__;
export const enableUnifiedSyncLane = __VARIANT__;
export const enableInfiniteRenderLoopDetection = __VARIANT__;

// Flow magic to verify the exports of this file match the original version.
((((null: any): ExportsType): DynamicFlagsType): ExportsType);
2 changes: 1 addition & 1 deletion packages/shared/forks/ReactFeatureFlags.native-fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const {
passChildrenWhenCloningPersistedNodes,
useMicrotasksForSchedulingInFabric,
enableUnifiedSyncLane,
enableInfiniteRenderLoopDetection,
} = dynamicFlags;

// The rest of the flags are static for better dead code elimination.
Expand Down Expand Up @@ -96,7 +97,6 @@ export const disableClientCache = true;

export const enableServerComponentKeys = true;
export const enableServerComponentLogs = true;
export const enableInfiniteRenderLoopDetection = false;

// TODO: Roll out with GK. Don't keep as dynamic flag for too long, though,
// because JSX is an extremely hot path.
Expand Down
1 change: 1 addition & 0 deletions scripts/flow/xplat.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ declare module 'ReactNativeInternalFeatureFlags' {
declare export var passChildrenWhenCloningPersistedNodes: boolean;
declare export var useMicrotasksForSchedulingInFabric: boolean;
declare export var enableUnifiedSyncLane: boolean;
declare export var enableInfiniteRenderLoopDetection: boolean;
}

0 comments on commit 5cd1339

Please sign in to comment.