Skip to content

Commit 897d7a2

Browse files
kassensJack-Works
authored andcommitted
Add dynamic disableModulePatternComponents flag for native-fb (facebook#27739)
Makes `disableModulePatternComponents` a flag to allow us a slow rollout for RN internally.
1 parent e8760d1 commit 897d7a2

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ import typeof * as DynamicFlagsType from 'ReactNativeInternalFeatureFlags';
2020
// flag here but it won't be set to `true` in any of our test runs. Need to
2121
// update the test configuration.
2222

23-
export const enableUseRefAccessWarning = __VARIANT__;
23+
export const alwaysThrottleRetries = __VARIANT__;
24+
export const disableModulePatternComponents = __VARIANT__;
2425
export const enableDeferRootSchedulingToMicrotask = __VARIANT__;
2526
export const enableUnifiedSyncLane = __VARIANT__;
26-
export const alwaysThrottleRetries = __VARIANT__;
27-
export const useMicrotasksForSchedulingInFabric = __VARIANT__;
27+
export const enableUseRefAccessWarning = __VARIANT__;
2828
export const passChildrenWhenCloningPersistedNodes = __VARIANT__;
29+
export const useMicrotasksForSchedulingInFabric = __VARIANT__;
2930

3031
// Flow magic to verify the exports of this file match the original version.
3132
((((null: any): ExportsType): DynamicFlagsType): ExportsType);

packages/shared/forks/ReactFeatureFlags.native-fb.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ import * as dynamicFlags from 'ReactNativeInternalFeatureFlags';
1818
// We destructure each value before re-exporting to avoid a dynamic look-up on
1919
// the exports object every time a flag is read.
2020
export const {
21-
enableUseRefAccessWarning,
21+
alwaysThrottleRetries,
22+
disableModulePatternComponents,
2223
enableDeferRootSchedulingToMicrotask,
2324
enableUnifiedSyncLane,
24-
alwaysThrottleRetries,
25-
useMicrotasksForSchedulingInFabric,
25+
enableUseRefAccessWarning,
2626
passChildrenWhenCloningPersistedNodes,
27+
useMicrotasksForSchedulingInFabric,
2728
} = dynamicFlags;
2829

2930
// The rest of the flags are static for better dead code elimination.
@@ -55,7 +56,6 @@ export const enableSuspenseCallback = false;
5556
export const disableLegacyContext = false;
5657
export const enableTrustedTypesIntegration = false;
5758
export const disableTextareaChildren = false;
58-
export const disableModulePatternComponents = false;
5959
export const enableSuspenseAvoidThisFallback = false;
6060
export const enableSuspenseAvoidThisFallbackFizz = false;
6161
export const enableCPUSuspense = true;

scripts/flow/xplat.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
*/
99

1010
declare module 'ReactNativeInternalFeatureFlags' {
11-
declare export var enableUseRefAccessWarning: boolean;
11+
declare export var alwaysThrottleRetries: boolean;
12+
declare export var disableModulePatternComponents: boolean;
1213
declare export var enableDeferRootSchedulingToMicrotask: boolean;
1314
declare export var enableUnifiedSyncLane: boolean;
14-
declare export var alwaysThrottleRetries: boolean;
15-
declare export var useMicrotasksForSchedulingInFabric: boolean;
15+
declare export var enableUseRefAccessWarning: boolean;
1616
declare export var passChildrenWhenCloningPersistedNodes: boolean;
17+
declare export var useMicrotasksForSchedulingInFabric: boolean;
1718
}

0 commit comments

Comments
 (0)