Skip to content

Remove ReactDOM.useEvent and associated types+tests #18689

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

Merged
merged 1 commit into from
Apr 21, 2020

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Apr 21, 2020

This PR removes the ReactDOM.unstable_useEvent API from the codebase. We are close to finding a lower level primitive to creating events in React without needing to couple the API to hooks only and that exploration might bring back some of the logic we had here, but ideally we'd probably revisit things again without bringing in as much of the overhead we had here. We'll likely bring back the useFocusWithin and useFocus APIs once we have the alternative API available too.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Apr 21, 2020
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit e0a2a41:

Sandbox Source
condescending-noyce-bkstq Configuration

@sizebot
Copy link

sizebot commented Apr 21, 2020

Details of bundled changes.

Comparing: 0960b7b...eb8070d

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js -0.2% -0.1% 572.47 KB 571.26 KB 119.25 KB 119.18 KB UMD_DEV
react-test-renderer.production.min.js -0.1% -0.1% 74.56 KB 74.49 KB 22.75 KB 22.73 KB UMD_PROD
react-test-renderer-shallow.production.min.js 0.0% -0.0% 12.74 KB 12.74 KB 3.97 KB 3.97 KB UMD_PROD
react-test-renderer.development.js -0.2% -0.1% 545.85 KB 544.71 KB 117.9 KB 117.81 KB NODE_DEV
react-test-renderer.production.min.js -0.1% -0.1% 74.36 KB 74.29 KB 22.43 KB 22.4 KB NODE_PROD
ReactTestRenderer-dev.js -1.1% -1.0% 578.07 KB 571.87 KB 122.37 KB 121.08 KB FB_WWW_DEV

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.profiling.min.js -0.1% 0.0% 128.77 KB 128.7 KB 40.23 KB 40.23 KB NODE_PROFILING
ReactDOM-dev.js -2.2% -2.1% 1.01 MB 1013.16 KB 231.33 KB 226.48 KB FB_WWW_DEV
ReactDOMServer-dev.js -0.6% -0.6% 161.56 KB 160.54 KB 41.04 KB 40.8 KB FB_WWW_DEV
ReactDOM-prod.js -3.3% -3.3% 434.3 KB 419.92 KB 76.44 KB 73.94 KB FB_WWW_PROD
ReactDOMServer-prod.js -0.8% -1.2% 52.47 KB 52.04 KB 12.69 KB 12.54 KB FB_WWW_PROD
ReactDOM-profiling.js -3.2% -3.2% 445.21 KB 430.82 KB 78.32 KB 75.79 KB FB_WWW_PROFILING
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 5.29 KB 5.29 KB 1.73 KB 1.73 KB NODE_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% -0.1% 1.17 KB 1.17 KB 668 B 667 B NODE_PROD
react-dom-test-utils.development.js 0.0% 0.0% 75.19 KB 75.19 KB 20.13 KB 20.13 KB UMD_DEV
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 5.03 KB 5.03 KB 1.67 KB 1.68 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 13.24 KB 13.24 KB 4.9 KB 4.9 KB UMD_PROD
ReactDOMTesting-dev.js -2.3% -2.2% 930.07 KB 908.79 KB 207.8 KB 203.31 KB FB_WWW_DEV
ReactDOMTesting-prod.js -3.2% -3.1% 391.14 KB 378.69 KB 71.56 KB 69.31 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% -0.0% 70.03 KB 70.03 KB 19.63 KB 19.63 KB NODE_DEV
ReactDOMTesting-profiling.js -3.2% -3.1% 391.14 KB 378.69 KB 71.56 KB 69.31 KB FB_WWW_PROFILING
react-dom-server.node.development.js -0.1% -0.1% 154.12 KB 154.04 KB 40.77 KB 40.74 KB NODE_DEV
react-dom-server.node.production.min.js -0.2% -0.3% 23.75 KB 23.7 KB 8.76 KB 8.74 KB NODE_PROD
react-dom.development.js -0.1% -0.0% 941.46 KB 940.14 KB 206.23 KB 206.16 KB UMD_DEV
react-dom-server.browser.development.js -0.1% -0.1% 162.44 KB 162.34 KB 41.29 KB 41.26 KB UMD_DEV
react-dom.production.min.js -0.1% 0.0% 124.58 KB 124.51 KB 39.79 KB 39.8 KB UMD_PROD
ReactDOMForked-dev.js -2.2% -2.1% 1.01 MB 1013.18 KB 231.5 KB 226.65 KB FB_WWW_DEV
react-dom-server.browser.production.min.js -0.2% -0.3% 23.46 KB 23.41 KB 8.62 KB 8.6 KB UMD_PROD
react-dom.profiling.min.js -0.1% 0.0% 128.44 KB 128.36 KB 40.98 KB 41 KB UMD_PROFILING
ReactDOMForked-prod.js -3.3% -3.3% 434.88 KB 420.49 KB 76.52 KB 74.03 KB FB_WWW_PROD
react-dom.development.js -0.1% -0.0% 896.35 KB 895.13 KB 203.67 KB 203.58 KB NODE_DEV
ReactDOMForked-profiling.js -3.2% -3.2% 445.78 KB 431.39 KB 78.41 KB 75.88 KB FB_WWW_PROFILING
react-dom-server.browser.development.js -0.1% -0.1% 152.91 KB 152.82 KB 40.52 KB 40.48 KB NODE_DEV
react-dom.production.min.js -0.1% -0.0% 124.77 KB 124.7 KB 39 KB 38.99 KB NODE_PROD
react-dom-server.browser.production.min.js -0.2% -0.3% 23.35 KB 23.29 KB 8.61 KB 8.58 KB NODE_PROD

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-dev.js -1.0% -1.0% 603.71 KB 597.52 KB 127.02 KB 125.81 KB FB_WWW_DEV
ReactART-prod.js -0.3% -0.2% 242.5 KB 241.87 KB 41.42 KB 41.32 KB FB_WWW_PROD
react-art.development.js -0.2% -0.1% 660.06 KB 658.84 KB 138.9 KB 138.82 KB UMD_DEV
react-art.production.min.js -0.1% -0.0% 110.79 KB 110.72 KB 33.59 KB 33.57 KB UMD_PROD
react-art.development.js -0.2% -0.1% 563.28 KB 562.14 KB 121.36 KB 121.28 KB NODE_DEV
react-art.production.min.js -0.1% -0.1% 75.74 KB 75.67 KB 22.77 KB 22.74 KB NODE_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js -0.2% -0.1% 661.54 KB 660.42 KB 141.93 KB 141.85 KB RN_FB_DEV
ReactNativeRenderer-prod.js -0.1% -0.1% 272.11 KB 271.95 KB 47 KB 46.97 KB RN_FB_PROD
ReactNativeRenderer-profiling.js -0.1% -0.1% 283.54 KB 283.37 KB 49.22 KB 49.19 KB RN_FB_PROFILING
ReactFabric-dev.js -0.2% -0.1% 638.4 KB 637.28 KB 136.7 KB 136.62 KB RN_OSS_DEV
ReactFabric-prod.js -0.1% -0.1% 263.95 KB 263.79 KB 45.45 KB 45.42 KB RN_OSS_PROD
ReactFabric-profiling.js -0.1% -0.1% 275.36 KB 275.19 KB 47.66 KB 47.63 KB RN_OSS_PROFILING
ReactFabric-dev.js -0.2% -0.1% 643.21 KB 642.09 KB 137.47 KB 137.4 KB RN_FB_DEV
ReactFabric-prod.js -0.1% -0.1% 264.11 KB 263.94 KB 45.48 KB 45.46 KB RN_FB_PROD
ReactNativeRenderer-dev.js -0.2% -0.1% 656.74 KB 655.62 KB 141.13 KB 141.04 KB RN_OSS_DEV
ReactFabric-profiling.js -0.1% -0.1% 275.51 KB 275.34 KB 47.69 KB 47.66 KB RN_FB_PROFILING
ReactNativeRenderer-prod.js -0.1% -0.1% 271.97 KB 271.8 KB 46.97 KB 46.94 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js -0.1% -0.1% 283.4 KB 283.23 KB 49.19 KB 49.16 KB RN_OSS_PROFILING

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler-reflection.development.js 0.0% -0.0% 17.58 KB 17.58 KB 5.19 KB 5.19 KB NODE_DEV
react-reconciler-reflection.production.min.js 0.0% -0.1% 2.93 KB 2.93 KB 1.22 KB 1.21 KB NODE_PROD
react-reconciler.development.js -0.2% -0.1% 606.26 KB 604.82 KB 128.36 KB 128.21 KB NODE_DEV
react-reconciler.production.min.js -0.0% -0.0% 81.25 KB 81.23 KB 24.08 KB 24.08 KB NODE_PROD

ReactDOM: size: 0.0%, gzip: 0.0%

Size changes (experimental)

Generated by 🚫 dangerJS against eb8070d

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 21, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit eb8070d:

Sandbox Source
lucid-cerf-6i1sk Configuration

@sizebot
Copy link

sizebot commented Apr 21, 2020

Details of bundled changes.

Comparing: 0960b7b...eb8070d

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.production.min.js -0.1% -0.0% 119.95 KB 119.87 KB 37.61 KB 37.6 KB NODE_PROD
react-dom-test-utils.development.js 0.0% 0.0% 75.18 KB 75.18 KB 20.13 KB 20.13 KB UMD_DEV
ReactDOMTesting-profiling.js -3.0% -2.8% 402.96 KB 390.87 KB 73.4 KB 71.33 KB FB_WWW_PROFILING
react-dom-server.node.production.min.js -0.2% -0.3% 23.3 KB 23.25 KB 8.68 KB 8.65 KB NODE_PROD
react-dom.profiling.min.js -0.1% -0.0% 123.82 KB 123.75 KB 38.76 KB 38.75 KB NODE_PROFILING
react-dom-test-utils.production.min.js 0.0% -0.0% 13.23 KB 13.23 KB 4.89 KB 4.89 KB UMD_PROD
ReactDOMServer-dev.js -0.6% -0.6% 165.06 KB 164.04 KB 41.95 KB 41.71 KB FB_WWW_DEV
ReactDOMServer-prod.js -0.8% -1.1% 53.36 KB 52.93 KB 12.87 KB 12.72 KB FB_WWW_PROD
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 4.53 KB 4.53 KB 1.57 KB 1.57 KB NODE_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.2% 1 KB 1 KB 610 B 609 B NODE_PROD
ReactDOMForked-dev.js -2.2% -2.0% 1.04 MB 1.01 MB 236.41 KB 231.69 KB FB_WWW_DEV
ReactDOMForked-prod.js -3.1% -2.8% 445.9 KB 431.86 KB 78.13 KB 75.94 KB FB_WWW_PROD
react-dom.development.js -0.1% -0.0% 907.78 KB 906.46 KB 199.78 KB 199.71 KB UMD_DEV
ReactDOMForked-profiling.js -3.1% -2.8% 456.86 KB 442.82 KB 80.05 KB 77.81 KB FB_WWW_PROFILING
react-dom.production.min.js -0.1% -0.0% 119.82 KB 119.75 KB 38.36 KB 38.35 KB UMD_PROD
react-dom.profiling.min.js -0.1% -0.1% 123.57 KB 123.5 KB 39.59 KB 39.56 KB UMD_PROFILING
ReactDOMTesting-dev.js -2.2% -2.2% 956.62 KB 935.33 KB 213.34 KB 208.68 KB FB_WWW_DEV
react-dom.development.js -0.1% -0.1% 864.11 KB 862.88 KB 197.26 KB 197.15 KB NODE_DEV
ReactDOMTesting-prod.js -3.0% -2.8% 402.96 KB 390.87 KB 73.4 KB 71.33 KB FB_WWW_PROD
react-dom-server.node.development.js -0.1% -0.1% 147.37 KB 147.28 KB 39.01 KB 38.98 KB NODE_DEV
ReactDOM-dev.js -2.2% -2.0% 1.04 MB 1.01 MB 236.24 KB 231.51 KB FB_WWW_DEV
ReactDOM-prod.js -3.2% -2.8% 445.32 KB 431.28 KB 78.04 KB 75.85 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% -0.0% 70.02 KB 70.02 KB 19.62 KB 19.62 KB NODE_DEV
ReactDOM-profiling.js -3.1% -2.8% 456.28 KB 442.24 KB 79.97 KB 77.73 KB FB_WWW_PROFILING
react-dom-server.browser.development.js -0.1% -0.1% 155.33 KB 155.23 KB 39.53 KB 39.5 KB UMD_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% -0.2% 1.16 KB 1.16 KB 660 B 659 B NODE_PROD
react-dom-server.browser.production.min.js -0.2% -0.3% 22.99 KB 22.94 KB 8.54 KB 8.52 KB UMD_PROD
react-dom-server.browser.development.js -0.1% -0.1% 146.15 KB 146.07 KB 38.76 KB 38.72 KB NODE_DEV
react-dom-server.browser.production.min.js -0.2% -0.3% 22.89 KB 22.84 KB 8.52 KB 8.49 KB NODE_PROD
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 5.01 KB 5.01 KB 1.67 KB 1.67 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.1% 1.19 KB 1.19 KB 698 B 697 B UMD_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js -0.2% -0.1% 656.73 KB 655.6 KB 141.12 KB 141.04 KB RN_OSS_DEV
ReactNativeRenderer-prod.js -0.1% -0.1% 271.96 KB 271.79 KB 46.96 KB 46.93 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js -0.1% -0.1% 283.39 KB 283.22 KB 49.18 KB 49.15 KB RN_OSS_PROFILING
ReactFabric-dev.js -0.2% -0.1% 638.39 KB 637.26 KB 136.7 KB 136.62 KB RN_OSS_DEV
ReactFabric-prod.js -0.1% -0.1% 263.94 KB 263.77 KB 45.44 KB 45.42 KB RN_OSS_PROD
ReactFabric-profiling.js -0.1% -0.1% 275.35 KB 275.18 KB 47.65 KB 47.63 KB RN_OSS_PROFILING

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-art.development.js -0.2% -0.1% 540.15 KB 539.01 KB 116.53 KB 116.45 KB NODE_DEV
react-art.production.min.js -0.1% -0.1% 72.5 KB 72.43 KB 21.79 KB 21.77 KB NODE_PROD
ReactART-dev.js -1.0% -0.9% 613.73 KB 607.53 KB 129.04 KB 127.83 KB FB_WWW_DEV
ReactART-prod.js -0.3% -0.2% 249.54 KB 248.9 KB 42.64 KB 42.54 KB FB_WWW_PROD
react-art.development.js -0.2% -0.1% 635.93 KB 634.71 KB 134.09 KB 134.02 KB UMD_DEV
react-art.production.min.js -0.1% -0.1% 107.51 KB 107.44 KB 32.63 KB 32.61 KB UMD_PROD

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js -0.2% -0.1% 545.82 KB 544.68 KB 117.89 KB 117.79 KB NODE_DEV
react-test-renderer.production.min.js -0.1% -0.1% 74.34 KB 74.27 KB 22.41 KB 22.38 KB NODE_PROD
ReactTestRenderer-dev.js -1.1% -1.1% 578.06 KB 571.86 KB 122.36 KB 121.08 KB FB_WWW_DEV
react-test-renderer.development.js -0.2% -0.1% 572.45 KB 571.23 KB 119.24 KB 119.17 KB UMD_DEV
react-test-renderer.production.min.js -0.1% -0.1% 74.54 KB 74.46 KB 22.73 KB 22.71 KB UMD_PROD

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler.development.js -0.2% -0.1% 580.76 KB 579.33 KB 123.04 KB 122.88 KB NODE_DEV
react-reconciler-reflection.development.js 0.0% -0.0% 17.57 KB 17.57 KB 5.18 KB 5.18 KB NODE_DEV
react-reconciler.production.min.js -0.0% -0.0% 77.61 KB 77.59 KB 23.06 KB 23.06 KB NODE_PROD
react-reconciler-reflection.production.min.js 0.0% -0.1% 2.92 KB 2.92 KB 1.21 KB 1.21 KB NODE_PROD

ReactDOM: size: 0.0%, gzip: -0.0%

Size changes (stable)

Generated by 🚫 dangerJS against eb8070d

Remove tests

Fix up look sharp

Fix
@trueadm trueadm merged commit ff431b7 into facebook:master Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants