Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read debugRenderPhaseSideEffects from GK #11603

Merged
merged 2 commits into from
Nov 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions packages/react-native-renderer/src/ReactNativeFeatureFlags.js
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions scripts/rollup/bundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ const bundles = [
'deepFreezeAndThrowOnMutationInDev',
'flattenStyle',
],
featureFlags: 'react-native-renderer/src/ReactNativeFeatureFlags',
},

/******* React Native RT *******/
Expand Down
2 changes: 1 addition & 1 deletion scripts/rollup/shims/rollup/ReactFeatureFlags-www.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down