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

Experimental Event API: add rootEventTypes support to event responders #15475

Merged
merged 3 commits into from
Apr 23, 2019

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Apr 23, 2019

This PR adds support for event responder having rootEventTypes without needing to dynamically add them during a target event type in onEvent.

Like targetEventTypes, event responders now support rootEventTypes as an array of possible events. To properly track these and unmount them, the event component instance object has a rootEventTypes property that we use for tracking the mounting/unmounting of root events. Also and invariant has been added to ensure we don't add duplicate root event types – otherwise, when we remove a root event type things will fall out of sync.

@sizebot
Copy link

sizebot commented Apr 23, 2019

ReactDOM: size: 0.0%, gzip: 0.0%

Details of bundled changes.

Comparing: 784ebd8...07e76c2

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js +0.3% +0.2% 811.37 KB 813.97 KB 185.25 KB 185.6 KB UMD_DEV
react-dom.production.min.js 0.0% 0.0% 103.58 KB 103.58 KB 33.65 KB 33.65 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 106.73 KB 106.73 KB 34.61 KB 34.61 KB UMD_PROFILING
react-dom.development.js +0.3% +0.2% 805.85 KB 808.45 KB 183.72 KB 184.07 KB NODE_DEV
react-dom.profiling.min.js 0.0% 0.0% 106.9 KB 106.9 KB 33.95 KB 33.96 KB NODE_PROFILING
ReactDOM-dev.js +0.3% +0.2% 830.03 KB 832.74 KB 185.06 KB 185.43 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.6% 🔺+0.6% 337.47 KB 339.58 KB 62.69 KB 63.07 KB FB_WWW_PROD
ReactDOM-profiling.js +0.6% +0.6% 342.85 KB 344.98 KB 63.61 KB 63.99 KB FB_WWW_PROFILING
react-dom-unstable-fire.development.js +0.3% +0.2% 811.7 KB 814.29 KB 185.39 KB 185.73 KB UMD_DEV
react-dom-unstable-fire.production.min.js 0.0% 0.0% 103.6 KB 103.6 KB 33.66 KB 33.66 KB UMD_PROD
react-dom-unstable-fire.profiling.min.js 0.0% 0.0% 106.75 KB 106.75 KB 34.62 KB 34.62 KB UMD_PROFILING
react-dom-unstable-fire.development.js +0.3% +0.2% 806.18 KB 808.77 KB 183.86 KB 184.2 KB NODE_DEV
react-dom-unstable-fire.production.min.js 0.0% 0.0% 103.59 KB 103.59 KB 33.11 KB 33.11 KB NODE_PROD
react-dom-unstable-fire.profiling.min.js 0.0% 0.0% 106.91 KB 106.91 KB 33.96 KB 33.96 KB NODE_PROFILING
ReactFire-dev.js +0.3% +0.2% 829.21 KB 831.93 KB 185.06 KB 185.42 KB FB_WWW_DEV
ReactFire-prod.js 🔺+0.6% 🔺+0.6% 325.44 KB 327.55 KB 60.23 KB 60.61 KB FB_WWW_PROD
ReactFire-profiling.js +0.6% +0.6% 330.79 KB 332.92 KB 61.18 KB 61.55 KB FB_WWW_PROFILING
react-dom-test-utils.production.min.js 0.0% 0.0% 10.52 KB 10.52 KB 3.89 KB 3.9 KB UMD_PROD
react-dom-test-utils.development.js 0.0% -0.0% 53.91 KB 53.91 KB 14.91 KB 14.91 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 10.31 KB 10.31 KB 3.82 KB 3.82 KB NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 60.43 KB 60.43 KB 15.72 KB 15.72 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 19.18 KB 19.18 KB 7.21 KB 7.21 KB UMD_PROD
react-dom-server.browser.production.min.js 0.0% -0.0% 19.1 KB 19.1 KB 7.2 KB 7.2 KB NODE_PROD
ReactDOMServer-dev.js 0.0% -0.0% 134.95 KB 134.95 KB 34.61 KB 34.61 KB FB_WWW_DEV
ReactDOMServer-prod.js 0.0% -0.0% 47.14 KB 47.14 KB 10.8 KB 10.8 KB FB_WWW_PROD
react-dom-server.node.production.min.js 0.0% -0.0% 19.96 KB 19.96 KB 7.51 KB 7.51 KB NODE_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 3.66 KB 3.66 KB 1.45 KB 1.45 KB UMD_DEV

Generated by 🚫 dangerJS

@trueadm trueadm merged commit 017d6f1 into facebook:master Apr 23, 2019
@trueadm trueadm deleted the root-events branch April 23, 2019 18:55
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