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

Deprecate undocumented ReactTestUtils.SimulateNative API #13407

Merged
merged 1 commit into from Apr 2, 2020

Conversation

@gaearon
Copy link
Member

@gaearon gaearon commented Aug 15, 2018

Fixes #11656.

This API is counter-intuitive because it only simulates the React dispatch of a native event, as opposed to simulating what the browser would do on an event. I've seen quite a few people confused by this. It's also completely undocumented.

I think it's a liability to keep this around.

@pull-bot
Copy link

@pull-bot pull-bot commented Aug 15, 2018

Details of bundled changes.

Comparing: 69e2a0d...05da6ad

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom-test-utils.development.js +1.4% +1.7% 44.84 KB 45.46 KB 12.15 KB 12.36 KB UMD_DEV
react-dom-test-utils.development.js +1.4% +1.7% 44.56 KB 45.18 KB 12.09 KB 12.29 KB NODE_DEV
ReactTestUtils-dev.js +1.6% +1.9% 41.65 KB 42.32 KB 11.14 KB 11.35 KB FB_WWW_DEV

Generated by 🚫 dangerJS

Copy link
Collaborator

@nhunzaker nhunzaker left a comment

Huzzah!

@gaearon
Copy link
Member Author

@gaearon gaearon commented Jan 23, 2020

Needs rebase. Probably still want to do this before 17. Although we may want to deprecate even more so maybe that needs to be a part of some other deprecation list.

@trueadm
trueadm approved these changes Apr 2, 2020
Copy link
Member

@trueadm trueadm left a comment

Needs rebasing with the latest changes to the event system having landed.

@gaearon gaearon force-pushed the gaearon:no-simulate-native branch from 05da6ad to 6bc9933 Apr 2, 2020
@codesandbox
Copy link

@codesandbox codesandbox bot commented Apr 2, 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 234905a:

Sandbox Source
gallant-butterfly-qxq7j Configuration
@trueadm
Copy link
Member

@trueadm trueadm commented Apr 2, 2020

I also wonder if we should remove the API entirely when the modern event system flag is enabled? That way I can remove all the internal requirements to use it from the modern event system, saving a bunch of bytes and making the Flow types nicer? I can always do in a follow up too.

@sizebot
Copy link

@sizebot sizebot commented Apr 2, 2020

Details of bundled changes.

Comparing: 7dfdff4...234905a

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.production.min.js 0.0% 0.0% 118.37 KB 118.37 KB 37.12 KB 37.13 KB NODE_PROD
react-dom-test-utils.development.js +1.1% +1.5% 60.94 KB 61.6 KB 16.09 KB 16.32 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 19.46 KB 19.46 KB 7.3 KB 7.3 KB NODE_PROD
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 4.81 KB 4.81 KB 1.61 KB 1.61 KB UMD_DEV
react-dom.profiling.min.js 0.0% 0.0% 122.23 KB 122.23 KB 38.28 KB 38.29 KB NODE_PROFILING
react-dom-test-utils.production.min.js 0.0% 0.0% 12.29 KB 12.29 KB 4.57 KB 4.57 KB UMD_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.3% 1.19 KB 1.19 KB 697 B 699 B UMD_PROD
react-dom-server.node.development.js 0.0% 0.0% 128.22 KB 128.22 KB 34.32 KB 34.32 KB NODE_DEV
react-dom-server.node.production.min.js 0.0% 0.0% 19.87 KB 19.87 KB 7.44 KB 7.45 KB NODE_PROD
ReactDOMForked-dev.js 0.0% 0.0% 989.99 KB 989.99 KB 219.75 KB 219.75 KB FB_WWW_DEV
react-dom-unstable-fizz.node.development.js 0.0% +0.1% 5.08 KB 5.08 KB 1.67 KB 1.67 KB NODE_DEV
react-dom.development.js 0.0% 0.0% 894.12 KB 894.12 KB 196.49 KB 196.49 KB UMD_DEV
ReactDOMForked-profiling.js 0.0% 0.0% 426.36 KB 426.36 KB 76.72 KB 76.72 KB FB_WWW_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 133.89 KB 133.89 KB 34.5 KB 34.5 KB UMD_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.3% 1.16 KB 1.16 KB 659 B 661 B NODE_PROD
react-dom.production.min.js 0.0% 0.0% 118.27 KB 118.27 KB 37.9 KB 37.9 KB UMD_PROD
react-dom-server.browser.production.min.js 0.0% 0.0% 19.55 KB 19.55 KB 7.32 KB 7.33 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 121.98 KB 121.98 KB 39.03 KB 39.04 KB UMD_PROFILING
ReactDOMTesting-dev.js 0.0% 0.0% 944.86 KB 944.86 KB 210.48 KB 210.48 KB FB_WWW_DEV
react-dom.development.js 0.0% 0.0% 851.18 KB 851.18 KB 194.08 KB 194.08 KB NODE_DEV
react-dom-server.browser.development.js 0.0% 0.0% 127 KB 127 KB 34.06 KB 34.06 KB NODE_DEV
ReactDOM-dev.js 0.0% 0.0% 989.99 KB 989.99 KB 219.75 KB 219.75 KB FB_WWW_DEV
ReactDOMServer-dev.js 0.0% 0.0% 136.77 KB 136.77 KB 34.86 KB 34.86 KB FB_WWW_DEV
react-dom-test-utils.development.js +1.1% +1.4% 56.33 KB 56.97 KB 15.48 KB 15.69 KB NODE_DEV
ReactDOMServer-prod.js 0.0% 0.0% 46.58 KB 46.58 KB 10.87 KB 10.87 KB FB_WWW_PROD
ReactDOM-profiling.js 0.0% 0.0% 426.36 KB 426.36 KB 76.72 KB 76.72 KB FB_WWW_PROFILING
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 57.04 KB 57.04 KB 14.11 KB 14.11 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.2% 1 KB 1 KB 609 B 610 B NODE_PROD
react-dom-unstable-native-dependencies.production.min.js 0.0% 🔺+0.1% 10.29 KB 10.29 KB 3.49 KB 3.49 KB UMD_PROD
ReactTestUtils-dev.js +1.2% +1.6% 58.32 KB 59.03 KB 15.72 KB 15.97 KB FB_WWW_DEV
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 54.08 KB 54.08 KB 13.9 KB 13.9 KB NODE_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 0.0% 10.05 KB 10.05 KB 3.38 KB 3.38 KB NODE_PROD

ReactDOM: size: 0.0%, gzip: 0.0%

Size changes (stable)

Generated by 🚫 dangerJS against 234905a

@sizebot
Copy link

@sizebot sizebot commented Apr 2, 2020

Details of bundled changes.

Comparing: 7dfdff4...234905a

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom-server.browser.development.js 0.0% 0.0% 135.47 KB 135.47 KB 34.7 KB 34.7 KB UMD_DEV
ReactTestUtils-dev.js +1.2% +1.6% 58.32 KB 59.03 KB 15.73 KB 15.97 KB FB_WWW_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 20.01 KB 20.01 KB 7.41 KB 7.41 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 126.48 KB 126.48 KB 39.5 KB 39.5 KB NODE_PROFILING
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 4.82 KB 4.82 KB 1.62 KB 1.62 KB UMD_DEV
ReactDOM-dev.js 0.0% 0.0% 962.34 KB 962.34 KB 213.52 KB 213.52 KB FB_WWW_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.3% 1.2 KB 1.2 KB 704 B 706 B UMD_PROD
ReactDOM-profiling.js 0.0% 0.0% 413.54 KB 413.54 KB 74.64 KB 74.64 KB FB_WWW_PROFILING
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.2% 1.02 KB 1.02 KB 617 B 618 B NODE_PROD
react-dom-test-utils.development.js +1.1% +1.5% 60.96 KB 61.61 KB 16.1 KB 16.33 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 12.3 KB 12.3 KB 4.57 KB 4.58 KB UMD_PROD
ReactDOMTesting-dev.js 0.0% 0.0% 918.4 KB 918.4 KB 204.71 KB 204.71 KB FB_WWW_DEV
react-dom-test-utils.development.js +1.1% +1.4% 56.35 KB 56.99 KB 15.49 KB 15.7 KB NODE_DEV
react-dom-server.node.development.js 0.0% 0.0% 129.73 KB 129.73 KB 34.53 KB 34.53 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 12.16 KB 12.16 KB 4.5 KB 4.5 KB NODE_PROD
react-dom-server.browser.development.js 0.0% 0.0% 128.51 KB 128.51 KB 34.27 KB 34.27 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 19.92 KB 19.92 KB 7.38 KB 7.38 KB NODE_PROD
react-dom.development.js 0.0% 0.0% 923.95 KB 923.95 KB 201.78 KB 201.79 KB UMD_DEV
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 57.05 KB 57.05 KB 14.12 KB 14.12 KB UMD_DEV
react-dom.production.min.js 0.0% 0.0% 122.33 KB 122.33 KB 39 KB 39 KB UMD_PROD
ReactDOMForked-dev.js 0.0% 0.0% 962.34 KB 962.34 KB 213.52 KB 213.52 KB FB_WWW_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 🔺+0.1% 10.31 KB 10.31 KB 3.49 KB 3.5 KB UMD_PROD
ReactDOMServer-dev.js 0.0% 0.0% 135.92 KB 135.92 KB 34.73 KB 34.73 KB FB_WWW_DEV
react-dom.profiling.min.js 0.0% 0.0% 126.15 KB 126.15 KB 40.25 KB 40.25 KB UMD_PROFILING
react-dom.development.js 0.0% 0.0% 879.78 KB 879.78 KB 199.31 KB 199.31 KB NODE_DEV
ReactDOMForked-profiling.js 0.0% 0.0% 413.54 KB 413.54 KB 74.64 KB 74.64 KB FB_WWW_PROFILING
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 54.1 KB 54.1 KB 13.91 KB 13.91 KB NODE_DEV
react-dom-unstable-fizz.node.development.js 0.0% +0.1% 5.09 KB 5.09 KB 1.68 KB 1.68 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 122.5 KB 122.5 KB 38.2 KB 38.2 KB NODE_PROD
react-dom-unstable-native-dependencies.production.min.js 0.0% 0.0% 10.06 KB 10.06 KB 3.39 KB 3.39 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.1% 1.17 KB 1.17 KB 667 B 668 B NODE_PROD

ReactDOM: size: 0.0%, gzip: 0.0%

Size changes (experimental)

Generated by 🚫 dangerJS against 234905a

@gaearon gaearon force-pushed the gaearon:no-simulate-native branch from 6bc9933 to 234905a Apr 2, 2020
@trueadm trueadm merged commit e55855e into facebook:master Apr 2, 2020
31 checks passed
31 checks passed
ci/circleci: NODE_ENV_production_yarn_test_www Your tests passed on CircleCI!
Details
ci/circleci: NODE_ENV_production_yarn_test_www_variant Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_NODE_ENV_production_yarn_test_www Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_NODE_ENV_production_yarn_test_www_variant Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_build Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_build Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_build_prod Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_dom_fixtures Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_persistent Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_prod Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_www Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_www_variant Your tests passed on CircleCI!
Details
ci/circleci: build_devtools_and_process_artifacts Your tests passed on CircleCI!
Details
ci/circleci: process_artifacts Your tests passed on CircleCI!
Details
ci/circleci: process_artifacts_experimental Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: sizebot_experimental Your tests passed on CircleCI!
Details
ci/circleci: sizebot_stable Your tests passed on CircleCI!
Details
ci/circleci: yarn_build Your tests passed on CircleCI!
Details
ci/circleci: yarn_flow Your tests passed on CircleCI!
Details
ci/circleci: yarn_lint Your tests passed on CircleCI!
Details
ci/circleci: yarn_lint_build Your tests passed on CircleCI!
Details
ci/circleci: yarn_test Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_build Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_build_devtools Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_build_prod Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_prod Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_www Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_www_variant Your tests passed on CircleCI!
Details
ci/codesandbox Building packages succeeded.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

9 participants
You can’t perform that action at this time.