Enable hooks by default for FB React Native renderer (#14435)
* Enable hooks by default for FB React Native renderer * Updated RN+FB feature flags to make some of the dynamic ones static
Brian Vaughn committed
Dec 13, 2018 at 13:20 UTC
2743fb7b23a5af42059a9b07c5f6048f941709d9
2 files changed
+6
-10
packages/shared/forks/ReactFeatureFlags.native-fb.js
+6
-8
@@ -13,16 +13,10 @@ import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags';
13
import typeof * as FeatureFlagsShimType from './ReactFeatureFlags.native-fb';
14
15
// Re-export dynamic flags from the fbsource version.
16
-export const {
17
- enableHooks,
18
- debugRenderPhaseSideEffects,
19
- debugRenderPhaseSideEffectsForStrictMode,
20
- warnAboutDeprecatedLifecycles,
21
- replayFailedUnitOfWorkWithInvokeGuardedCallback,
22
- disableInputAttributeSyncing,
23
-} = require('ReactFeatureFlags');
16
+export const {debugRenderPhaseSideEffects} = require('ReactFeatureFlags');
17
18
// The rest of the flags are static for better dead code elimination.
19
+export const enableHooks = true;
20
export const enableUserTimingAPI = __DEV__;
21
export const enableProfilerTimer = __PROFILE__;
22
export const enableSchedulerTracing = __PROFILE__;
@@ -30,6 +24,10 @@ export const enableSuspenseServerRenderer = false;
24
export const enableStableConcurrentModeAPIs = false;
25
export const warnAboutShorthandPropertyCollision = false;
26
export const enableSchedulerDebugging = false;
27
+export const debugRenderPhaseSideEffectsForStrictMode = true;
28
+export const disableInputAttributeSyncing = false;
29
+export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
30
+export const warnAboutDeprecatedLifecycles = true;
31
32
// Only used in www builds.
33
export function addUserTimingListener() {
scripts/rollup/shims/react-native-fb/ReactFeatureFlags.js
-2
@@ -12,8 +12,6 @@
12
13
const ReactFeatureFlags = {
14
debugRenderPhaseSideEffects: false,
15
- debugRenderPhaseSideEffectsForStrictMode: false,
16
- warnAboutDeprecatedLifecycles: true,
15
};
16
17
module.exports = ReactFeatureFlags;