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

Enable hooks by default for FB React Native renderer #14435

Merged
merged 2 commits into from
Dec 13, 2018

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Dec 13, 2018

No description provided.

@@ -23,6 +22,7 @@ export const {
} = require('ReactFeatureFlags');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of these, are they still relevant to be dynamic or can we just turn them on or off?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only debugRenderPhaseSideEffects is currently dynamically configured internally.

We always set debugRenderPhaseSideEffectsForStrictMode to true.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like debugRenderPhaseSideEffects is a dynamic value, debugRenderPhaseSideEffectsForStrictMode is being set to true in InitializeReactFeatureFlags, and nothing is changing the default value of warnAboutDeprecatedLifecycles.

@sizebot
Copy link

sizebot commented Dec 13, 2018

Details of bundled changes.

Comparing: a22880e...f7eaa2d

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js -0.0% -0.0% 568.59 KB 568.38 KB 123.54 KB 123.49 KB RN_FB_DEV
ReactNativeRenderer-prod.js 🔺+0.2% -0.1% 238.83 KB 239.22 KB 42 KB 41.97 KB RN_FB_PROD
ReactNativeRenderer-profiling.js +0.2% -0.1% 244.7 KB 245.09 KB 43.36 KB 43.34 KB RN_FB_PROFILING
ReactNativeRenderer-dev.js 0.0% -0.0% 568.29 KB 568.29 KB 123.46 KB 123.46 KB RN_OSS_DEV
ReactFabric-dev.js 0.0% -0.0% 559.1 KB 559.1 KB 121.1 KB 121.1 KB RN_FB_DEV
ReactFabric-prod.js 0.0% -0.0% 233.34 KB 233.34 KB 40.77 KB 40.77 KB RN_FB_PROD
ReactFabric-dev.js 0.0% -0.0% 559.13 KB 559.13 KB 121.12 KB 121.12 KB RN_OSS_DEV

Generated by 🚫 dangerJS

@bvaughn
Copy link
Contributor Author

bvaughn commented Dec 13, 2018

I've pushed another commit to this branch that makes all but one of the flags (debugRenderPhaseSideEffects) static.

Here are the new flag values:

flag previous current
debugRenderPhaseSideEffects (dynamic) (dynamic)
debugRenderPhaseSideEffectsForStrictMode true true
disableInputAttributeSyncing false false
enableHooks (dynamic) true
replayFailedUnitOfWorkWithInvokeGuardedCallback false __DEV__
warnAboutDeprecatedLifecycles true true

@bvaughn bvaughn merged commit 2743fb7 into facebook:master Dec 13, 2018
@bvaughn bvaughn deleted the fb-ReactNative-enableHooks-flag branch December 13, 2018 21:20
jetoneza pushed a commit to jetoneza/react that referenced this pull request Jan 23, 2019
* Enable hooks by default for FB React Native renderer
* Updated RN+FB feature flags to make some of the dynamic ones static
n8schloss pushed a commit to n8schloss/react that referenced this pull request Jan 31, 2019
* Enable hooks by default for FB React Native renderer
* Updated RN+FB feature flags to make some of the dynamic ones static
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants