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 in www build #14116

Merged
merged 1 commit into from
Nov 6, 2018
Merged

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Nov 6, 2018

The enableHooks feature flag used to only control whether the API was exposed on the React package. But since #14111 landed, it also determines if the dispatcher and implementation are included in the bundle.

We're using hooks in www, so I've switched the feature flag to true in the www build.

(Alternatively, we could have two feature flags: one for the implementation and dispatcher, and one for exposing the API on the React package.)

The `enableHooks` feature flag used to only control whether the API
was exposed on the React package. But now it also determines if the
dispatcher and implementation are included in the bundle.

We're using hooks in www, so I've switched the feature flag to `true`
in the www build.

(Alternatively, we could have two feature flags: one for the
implementation and dispatcher, and one for exposing the API on the
React package.)
@sizebot
Copy link

sizebot commented Nov 6, 2018

Details of bundled changes.

Comparing: e9a2ec9...da45ed0

react

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
React-dev.js -0.0% -0.0% 56.97 KB 56.97 KB 15.34 KB 15.33 KB FB_WWW_DEV
React-prod.js 🔺+9.4% 🔺+6.0% 13.7 KB 14.99 KB 3.81 KB 4.04 KB FB_WWW_PROD
React-profiling.js +9.4% +6.0% 13.7 KB 14.99 KB 3.81 KB 4.04 KB FB_WWW_PROFILING

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactDOM-dev.js -0.0% 0.0% 720.29 KB 720.29 KB 163.06 KB 163.06 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+5.0% 🔺+5.4% 296.42 KB 311.17 KB 54.24 KB 57.18 KB FB_WWW_PROD
ReactDOMServer-dev.js -0.0% -0.0% 114.82 KB 114.82 KB 29.91 KB 29.91 KB FB_WWW_DEV
ReactDOMServer-prod.js 🔺+14.2% 🔺+12.5% 35.52 KB 40.58 KB 8.51 KB 9.57 KB FB_WWW_PROD
ReactDOM-profiling.js +5.0% +5.2% 302.38 KB 317.38 KB 55.57 KB 58.44 KB FB_WWW_PROFILING

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-dev.js -0.0% -0.0% 429.71 KB 429.71 KB 90.67 KB 90.67 KB FB_WWW_DEV
ReactART-prod.js 🔺+8.7% 🔺+10.2% 170 KB 184.73 KB 28.61 KB 31.52 KB FB_WWW_PROD

scheduler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
scheduler.development.js n/a n/a 0 B 19.17 KB 0 B 5.74 KB UMD_DEV
scheduler.production.min.js n/a n/a 0 B 3.16 KB 0 B 1.53 KB UMD_PROD

Generated by 🚫 dangerJS

@acdlite acdlite merged commit 0a0f503 into facebook:master Nov 6, 2018
gaearon pushed a commit to gaearon/react that referenced this pull request Nov 6, 2018
The `enableHooks` feature flag used to only control whether the API
was exposed on the React package. But now it also determines if the
dispatcher and implementation are included in the bundle.

We're using hooks in www, so I've switched the feature flag to `true`
in the www build.

(Alternatively, we could have two feature flags: one for the
implementation and dispatcher, and one for exposing the API on the
React package.)
jetoneza pushed a commit to jetoneza/react that referenced this pull request Jan 23, 2019
The `enableHooks` feature flag used to only control whether the API
was exposed on the React package. But now it also determines if the
dispatcher and implementation are included in the bundle.

We're using hooks in www, so I've switched the feature flag to `true`
in the www build.

(Alternatively, we could have two feature flags: one for the
implementation and dispatcher, and one for exposing the API on the
React package.)
n8schloss pushed a commit to n8schloss/react that referenced this pull request Jan 31, 2019
The `enableHooks` feature flag used to only control whether the API
was exposed on the React package. But now it also determines if the
dispatcher and implementation are included in the bundle.

We're using hooks in www, so I've switched the feature flag to `true`
in the www build.

(Alternatively, we could have two feature flags: one for the
implementation and dispatcher, and one for exposing the API on the
React package.)
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.

4 participants