diff --git a/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js b/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js index 6e9aaacf0e..d2fd9887ae 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js +++ b/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js @@ -7,10 +7,8 @@ * @flow strict */ -// NOTE: There are no flags, currently. Uncomment the stuff below if we add one. - -// import typeof * as ExportsType from './ReactFeatureFlags.native-fb-dynamic'; -// import typeof * as DynamicFlagsType from 'ReactNativeInternalFeatureFlags'; +import typeof * as ExportsType from './ReactFeatureFlags.native-fb-dynamic'; +import typeof * as DynamicFlagsType from 'ReactNativeInternalFeatureFlags'; // In xplat, these flags are controlled by GKs. Because most GKs have some // population running in either mode, we should run our tests that way, too, @@ -22,5 +20,7 @@ // flag here but it won't be set to `true` in any of our test runs. Need to // update the test configuration. -// // Flow magic to verify the exports of this file match the original version. -// ((((null: any): ExportsType): FeatureFlagsType): ExportsType); +export const enableUseRefAccessWarning = __VARIANT__; + +// Flow magic to verify the exports of this file match the original version. +((((null: any): ExportsType): DynamicFlagsType): ExportsType); diff --git a/packages/shared/forks/ReactFeatureFlags.native-fb.js b/packages/shared/forks/ReactFeatureFlags.native-fb.js index e81b1d3d37..8fb6f5359c 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-fb.js +++ b/packages/shared/forks/ReactFeatureFlags.native-fb.js @@ -13,11 +13,11 @@ import typeof * as ExportsType from './ReactFeatureFlags.native-fb'; // NOTE: There are no flags, currently. Uncomment the stuff below if we add one. // Re-export dynamic flags from the internal module. Intentionally using * // because this import is compiled to a `require` call. -// import * as dynamicFlags from 'ReactNativeInternalFeatureFlags'; +import * as dynamicFlags from 'ReactNativeInternalFeatureFlags'; // We destructure each value before re-exporting to avoid a dynamic look-up on // the exports object every time a flag is read. -// export const {} = dynamicFlags; +export const {enableUseRefAccessWarning} = dynamicFlags; // The rest of the flags are static for better dead code elimination. export const enableDebugTracing = false; @@ -67,7 +67,6 @@ export const deferRenderPhaseUpdateToNextBatch = false; export const enableStrictEffects = __DEV__; export const createRootStrictEffectsByDefault = false; -export const enableUseRefAccessWarning = false; export const disableSchedulerTimeoutInWorkLoop = false; export const enableLazyContextPropagation = false; diff --git a/scripts/flow/xplat.js b/scripts/flow/xplat.js index 45c12d2a6f..99137729a9 100644 --- a/scripts/flow/xplat.js +++ b/scripts/flow/xplat.js @@ -8,4 +8,5 @@ */ declare module 'ReactNativeInternalFeatureFlags' { + declare export var enableUseRefAccessWarning: boolean; }