[React Native FB] dynamic feature flag for ref access warning (#25471)
This commit is contained in:
parent
fd31724d5d
commit
ea5bc6bac1
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -8,4 +8,5 @@
|
|||
*/
|
||||
|
||||
declare module 'ReactNativeInternalFeatureFlags' {
|
||||
declare export var enableUseRefAccessWarning: boolean;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue