Skip to content

[Flare] Move unstable_createEventComponent to ReactDOM#15890

Merged
trueadm merged 5 commits intofacebook:masterfrom
trueadm:split-responders-by-renderer
Jun 18, 2019
Merged

[Flare] Move unstable_createEventComponent to ReactDOM#15890
trueadm merged 5 commits intofacebook:masterfrom
trueadm:split-responders-by-renderer

Conversation

@trueadm
Copy link
Contributor

@trueadm trueadm commented Jun 14, 2019

This PR does two things:

  • Moves React.unstable_createEventComponent to ReactDOM.unstable_createEventComponent.
  • Breaks up the new event system Flow types by core and ReactDOM, thus making it easier in the future to have different Flow types per renderer/platform.

@sizebot
Copy link

sizebot commented Jun 14, 2019

React: size: -0.3%, gzip: -0.2%

Details of bundled changes.

Comparing: 353e0ee...502316d

react

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react.development.js -1.1% -1.2% 110.13 KB 108.97 KB 27.79 KB 27.46 KB UMD_DEV
react.production.min.js -0.3% -0.2% 12.3 KB 12.25 KB 4.79 KB 4.78 KB UMD_PROD
react.profiling.min.js -0.3% -0.3% 14.45 KB 14.41 KB 5.32 KB 5.3 KB UMD_PROFILING
react.development.js -1.6% -1.8% 71.73 KB 70.57 KB 18.66 KB 18.33 KB NODE_DEV
react.production.min.js -0.6% -0.5% 6.58 KB 6.53 KB 2.72 KB 2.71 KB NODE_PROD
React-dev.js -1.7% -2.0% 69.77 KB 68.61 KB 17.93 KB 17.58 KB FB_WWW_DEV
React-prod.js -1.8% -1.7% 16.57 KB 16.27 KB 4.36 KB 4.29 KB FB_WWW_PROD
React-profiling.js -1.8% -1.7% 16.57 KB 16.27 KB 4.36 KB 4.29 KB FB_WWW_PROFILING

react-events

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-events-hover.development.js +0.2% +0.2% 8.74 KB 8.76 KB 2.09 KB 2.09 KB UMD_DEV
react-events-drag.development.js +1320.9% +1185.4% 5.87 KB 83.46 KB 1.66 KB 21.3 KB UMD_DEV
react-events-hover.production.min.js 🔺+0.3% 🔺+0.1% 3.78 KB 3.79 KB 1.39 KB 1.4 KB UMD_PROD
ReactEventsFocus-dev.js +0.1% +0.3% 7.08 KB 7.09 KB 1.81 KB 1.81 KB FB_WWW_DEV
react-events-drag.production.min.js 🔺+306.2% 🔺+235.6% 2.51 KB 10.21 KB 1.15 KB 3.85 KB UMD_PROD
ReactEventsScroll-dev.js +0.3% +0.6% 3.66 KB 3.67 KB 1.15 KB 1.16 KB FB_WWW_DEV
react-events.development.js 0.0% +0.1% 1.31 KB 1.31 KB 707 B 708 B UMD_DEV
react-events-focus-scope.development.js +0.4% +0.5% 4.22 KB 4.23 KB 1.3 KB 1.31 KB UMD_DEV
react-events.production.min.js 0.0% 🔺+0.2% 682 B 682 B 431 B 432 B UMD_PROD
ReactEventsPress-dev.js 0.0% +0.1% 23.59 KB 23.6 KB 5.37 KB 5.38 KB FB_WWW_DEV
react-events-focus-scope.production.min.js 🔺+0.6% 🔺+0.7% 1.8 KB 1.81 KB 943 B 950 B UMD_PROD
ReactEventsSwipe-dev.js +0.2% +0.4% 6.13 KB 6.14 KB 1.68 KB 1.69 KB FB_WWW_DEV
ReactEventsPress-prod.js 0.0% 🔺+0.2% 20.19 KB 20.2 KB 4.15 KB 4.16 KB FB_WWW_PROD
ReactEventsSwipe-prod.js 🔺+0.2% 🔺+0.5% 5.85 KB 5.86 KB 1.48 KB 1.49 KB FB_WWW_PROD
react-events.development.js 0.0% +0.3% 1.12 KB 1.12 KB 644 B 646 B NODE_DEV
react-events-focus-scope.development.js +0.2% +0.5% 4.03 KB 4.04 KB 1.25 KB 1.26 KB NODE_DEV
react-events.production.min.js 0.0% 🔺+0.3% 512 B 512 B 353 B 354 B NODE_PROD
react-events-focus-scope.production.min.js 🔺+0.2% 🔺+0.5% 1.6 KB 1.61 KB 855 B 859 B NODE_PROD
react-events-focus.development.js +0.2% +0.4% 7.14 KB 7.16 KB 1.82 KB 1.83 KB UMD_DEV
react-events-scroll.development.js +0.4% +0.6% 3.86 KB 3.88 KB 1.2 KB 1.21 KB UMD_DEV
react-events-focus.production.min.js 🔺+0.4% 🔺+0.5% 3.05 KB 3.06 KB 1.17 KB 1.18 KB UMD_PROD
ReactEventsFocusScope-dev.js +0.2% +0.5% 4.01 KB 4.02 KB 1.23 KB 1.24 KB FB_WWW_DEV
react-events-scroll.production.min.js 🔺+0.6% 🔺+0.7% 1.74 KB 1.75 KB 873 B 879 B UMD_PROD
ReactEventsFocusScope-prod.js 🔺+0.1% 🔺+0.4% 3.44 KB 3.44 KB 1.05 KB 1.06 KB FB_WWW_PROD
react-events-focus.development.js +0.1% +0.4% 6.96 KB 6.97 KB 1.77 KB 1.78 KB NODE_DEV
react-events-scroll.development.js +0.3% +0.7% 3.68 KB 3.69 KB 1.14 KB 1.15 KB NODE_DEV
react-events-focus.production.min.js 🔺+0.1% 🔺+0.2% 2.87 KB 2.88 KB 1.1 KB 1.1 KB NODE_PROD
react-events-scroll.production.min.js 🔺+0.3% 🔺+0.5% 1.54 KB 1.54 KB 778 B 782 B NODE_PROD
ReactEventsFocus-prod.js 🔺+0.2% 🔺+0.5% 6.15 KB 6.16 KB 1.44 KB 1.44 KB FB_WWW_PROD
ReactEventsScroll-prod.js 🔺+0.1% 🔺+0.4% 3.23 KB 3.23 KB 993 B 997 B FB_WWW_PROD
react-events-hover.development.js +0.1% +0.4% 8.56 KB 8.57 KB 2.04 KB 2.04 KB NODE_DEV
react-events-drag.development.js +0.1% +0.3% 7.63 KB 7.64 KB 2.32 KB 2.32 KB NODE_DEV
react-events-hover.production.min.js 🔺+0.1% 🔺+0.1% 3.6 KB 3.6 KB 1.33 KB 1.33 KB NODE_PROD
react-events-drag.production.min.js 🔺+0.1% 🔺+0.2% 3.15 KB 3.16 KB 1.45 KB 1.45 KB NODE_PROD
react-events-press.development.js +0.1% +0.1% 22.8 KB 22.81 KB 5.24 KB 5.25 KB UMD_DEV
react-events-swipe.development.js +0.3% +0.4% 6.16 KB 6.17 KB 1.71 KB 1.71 KB UMD_DEV
react-events-press.production.min.js 🔺+0.1% 🔺+0.4% 8.08 KB 8.09 KB 2.94 KB 2.95 KB UMD_PROD
ReactEventsHover-dev.js +0.1% +0.4% 8.76 KB 8.77 KB 2.09 KB 2.1 KB FB_WWW_DEV
react-events-swipe.production.min.js 🔺+0.4% 🔺+0.7% 2.6 KB 2.62 KB 1.19 KB 1.19 KB UMD_PROD
ReactEventsDrag-dev.js +0.2% +0.4% 5.93 KB 5.94 KB 1.61 KB 1.61 KB FB_WWW_DEV
ReactEventsHover-prod.js 🔺+0.1% 🔺+0.4% 7.7 KB 7.71 KB 1.78 KB 1.79 KB FB_WWW_PROD
ReactEventsDrag-prod.js 🔺+0.2% 🔺+0.3% 5.37 KB 5.38 KB 1.38 KB 1.39 KB FB_WWW_PROD
react-events-press.development.js 0.0% +0.2% 22.62 KB 22.63 KB 5.19 KB 5.2 KB NODE_DEV
react-events-swipe.development.js +0.2% +0.4% 5.98 KB 5.99 KB 1.66 KB 1.67 KB NODE_DEV
react-events-press.production.min.js 0.0% 🔺+0.1% 7.9 KB 7.91 KB 2.9 KB 2.9 KB NODE_PROD
react-events-swipe.production.min.js 🔺+0.2% 🔺+0.3% 2.43 KB 2.43 KB 1.12 KB 1.12 KB NODE_PROD

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.profiling.min.js 0.0% 0.0% 109.34 KB 109.34 KB 34.74 KB 34.74 KB NODE_PROFILING
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.76 KB 60.76 KB 15.85 KB 15.85 KB UMD_DEV
ReactDOM-dev.js +0.1% +0.1% 887.15 KB 888.3 KB 197.5 KB 197.73 KB FB_WWW_DEV
ReactDOMServer-dev.js 0.0% 0.0% 135.46 KB 135.46 KB 34.8 KB 34.8 KB FB_WWW_DEV
react-dom-unstable-fire.development.js 0.0% 0.0% 867.52 KB 867.55 KB 197.64 KB 197.66 KB UMD_DEV
react-dom-unstable-fire.production.min.js 0.0% -0.0% 106.02 KB 106.02 KB 34.49 KB 34.49 KB UMD_PROD
react-dom-unstable-fire.profiling.min.js 0.0% 0.0% 109.18 KB 109.18 KB 35.46 KB 35.46 KB UMD_PROFILING
react-dom-unstable-fire.development.js 0.0% 0.0% 861.88 KB 861.9 KB 196.06 KB 196.08 KB NODE_DEV
react-dom-server.node.development.js 0.0% 0.0% 135.27 KB 135.27 KB 35.81 KB 35.82 KB NODE_DEV
react-dom-unstable-fire.production.min.js 0.0% 0.0% 106.02 KB 106.02 KB 33.89 KB 33.89 KB NODE_PROD
react-dom-server.node.production.min.js 0.0% 0.0% 19.98 KB 19.98 KB 7.53 KB 7.53 KB NODE_PROD
react-dom.development.js +0.1% +0.1% 867.17 KB 868.32 KB 197.51 KB 197.72 KB UMD_DEV
react-dom-server.browser.development.js 0.0% 0.0% 137.2 KB 137.2 KB 36.2 KB 36.2 KB UMD_DEV
ReactFire-dev.js 0.0% 0.0% 886.36 KB 886.39 KB 197.43 KB 197.45 KB FB_WWW_DEV
react-dom.profiling.min.js 0.0% 0.0% 109.16 KB 109.16 KB 35.45 KB 35.45 KB UMD_PROFILING
ReactFire-prod.js -0.0% 0.0% 346.17 KB 346.13 KB 63.64 KB 63.64 KB FB_WWW_PROD
react-dom.development.js +0.1% +0.1% 861.53 KB 862.68 KB 195.92 KB 196.14 KB NODE_DEV
ReactFire-profiling.js -0.0% -0.0% 351.44 KB 351.4 KB 64.53 KB 64.53 KB FB_WWW_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 133.33 KB 133.33 KB 35.27 KB 35.27 KB NODE_DEV
ReactDOM-prod.js 0.0% 🔺+0.1% 358.19 KB 358.35 KB 66.11 KB 66.17 KB FB_WWW_PROD
ReactDOM-profiling.js 0.0% +0.1% 364.63 KB 364.8 KB 67.22 KB 67.28 KB FB_WWW_PROFILING
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.43 KB 60.43 KB 15.72 KB 15.73 KB NODE_DEV
react-dom-unstable-fizz.node.development.js 0.0% +0.1% 3.88 KB 3.88 KB 1.51 KB 1.51 KB NODE_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.1% 1.1 KB 1.1 KB 667 B 668 B NODE_PROD
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 3.81 KB 3.81 KB 1.54 KB 1.54 KB UMD_DEV
react-dom-test-utils.development.js 0.0% 0.0% 55.9 KB 55.9 KB 15.5 KB 15.5 KB NODE_DEV
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 3.64 KB 3.64 KB 1.49 KB 1.49 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 10.56 KB 10.56 KB 3.92 KB 3.92 KB NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.2% 1.05 KB 1.05 KB 636 B 637 B NODE_PROD

Generated by 🚫 dangerJS

entry: 'react-events/press',
global: 'ReactEventsPress',
externals: ['react'],
externals: ['react-dom'],
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this means that we should add it as a dep in the package.json.

https://github.com/facebook/react/blob/master/packages/react-events/package.json#L40

I know yarn pnp relied on this package information for module resolution.

That's unfortunate since it's not a dep for the whole package. Just when used in a DOM environment. Not sure how mixed RN / web code deals with this. cc @necolas

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This isn't a big deal for now. We aren't going to be publishing react-events anytime soon. This was one of the reasons I tried to avoid this approach to begin with, but we could get around this with some kind of build step, it just means that these can't really ever go in react, but must be their own separate package – otherwise react will pull in ever renderer out there.

@trueadm trueadm force-pushed the split-responders-by-renderer branch from 1f82973 to e4ce62d Compare June 15, 2019 00:37
@trueadm trueadm merged commit 689beef into facebook:master Jun 18, 2019
@trueadm trueadm deleted the split-responders-by-renderer branch June 18, 2019 22:41
rickhanlonii pushed a commit to rickhanlonii/react that referenced this pull request Jun 25, 2019
NMinhNguyen referenced this pull request in enzymejs/react-shallow-renderer Jan 29, 2020
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