Read debugRenderPhaseSideEffects from GK (#11603)

* Forked ReactFeatureFlags for React Native to enable debugRenderPhaseSideEffects GK
* Changed debugRenderPhaseSideEffects in www feature flags to be runtime as well
This commit is contained in:
Brian Vaughn
2017-11-20 14:05:53 -08:00
committed by GitHub
parent adcf980333
commit dbf715c958
3 changed files with 39 additions and 1 deletions
@@ -0,0 +1,37 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import invariant from 'fbjs/lib/invariant';
import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags';
import typeof * as FeatureFlagsShimType from './ReactNativeFeatureFlags';
// Re-export dynamic flags from the fbsource version.
export const {debugRenderPhaseSideEffects} = require('ReactFeatureFlags');
// The rest of the flags are static for better dead code elimination.
export const enableAsyncSubtreeAPI = true;
export const enableAsyncSchedulingByDefaultInReactDOM = false;
export const enableReactFragment = false;
export const enableCreateRoot = false;
export const enableUserTimingAPI = __DEV__;
export const enableMutatingReconciler = true;
export const enableNoopReconciler = false;
export const enablePersistentReconciler = false;
// Only used in www builds.
export function addUserTimingListener() {
invariant(false, 'Not implemented.');
}
// Flow magic to verify the exports of this file match the original version.
// eslint-disable-next-line no-unused-vars
type Check<_X, Y: _X, X: Y = _X> = null;
// eslint-disable-next-line no-unused-expressions
(null: Check<FeatureFlagsShimType, FeatureFlagsType>);
+1
View File
@@ -129,6 +129,7 @@ const bundles = [
'deepFreezeAndThrowOnMutationInDev',
'flattenStyle',
],
featureFlags: 'react-native-renderer/src/ReactNativeFeatureFlags',
},
/******* React Native RT *******/
@@ -12,11 +12,11 @@ import typeof * as FeatureFlagsShimType from './ReactFeatureFlags-www';
// Re-export dynamic flags from the www version.
export const {
debugRenderPhaseSideEffects,
enableAsyncSchedulingByDefaultInReactDOM,
} = require('ReactFeatureFlags');
// The rest of the flags are static for better dead code elimination.
export const debugRenderPhaseSideEffects = false;
export const enableAsyncSubtreeAPI = true;
export const enableReactFragment = false;
export const enableCreateRoot = true;