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

improve error message for cross-functional component updates #18316

Merged
merged 6 commits into from Mar 16, 2020

Conversation

JoviDeCroock
Copy link
Contributor

Summary

This improves the error message used for "cross-functional component updates"

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 15, 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 e81ae47:

Sandbox Source
young-surf-sirwb Configuration

@sizebot
Copy link

sizebot commented Mar 15, 2020

Details of bundled changes.

Comparing: 730389b...e81ae47

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-art.development.js +0.1% +0.1% 632.84 KB 633.62 KB 133.34 KB 133.51 KB UMD_DEV
react-art.production.min.js 0.0% -0.0% 106.5 KB 106.5 KB 32.33 KB 32.33 KB UMD_PROD
react-art.development.js +0.1% +0.2% 537 KB 537.76 KB 115.67 KB 115.84 KB NODE_DEV
react-art.production.min.js 0.0% -0.0% 71.54 KB 71.54 KB 21.53 KB 21.53 KB NODE_PROD
ReactART-dev.js +0.1% +0.1% 598.65 KB 599.48 KB 125.16 KB 125.34 KB FB_WWW_DEV
ReactART-prod.js 0.0% -0.0% 242.14 KB 242.14 KB 41.21 KB 41.21 KB FB_WWW_PROD

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js +0.1% +0.1% 570.32 KB 571.1 KB 118.55 KB 118.72 KB UMD_DEV
react-test-renderer.production.min.js 0.0% -0.0% 73.51 KB 73.51 KB 22.4 KB 22.4 KB UMD_PROD
react-test-renderer-shallow.development.js 0.0% 0.0% 38.39 KB 38.39 KB 9.29 KB 9.29 KB UMD_DEV
react-test-renderer.development.js +0.1% +0.1% 543.56 KB 544.32 KB 117.17 KB 117.33 KB NODE_DEV
react-test-renderer.production.min.js 0.0% -0.0% 73.33 KB 73.33 KB 22.07 KB 22.07 KB NODE_PROD
ReactTestRenderer-dev.js +0.1% +0.2% 570.91 KB 571.74 KB 120.4 KB 120.59 KB FB_WWW_DEV

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactDOM-profiling.js 0.0% -0.0% 427.69 KB 427.69 KB 77.63 KB 77.63 KB FB_WWW_PROFILING
react-dom-test-utils.production.min.js 0.0% -0.0% 12.29 KB 12.29 KB 4.52 KB 4.52 KB NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 58.22 KB 58.22 KB 14.53 KB 14.53 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.2% 1013 B 1013 B 603 B 602 B NODE_PROD
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.0% 10.31 KB 10.31 KB 3.49 KB 3.49 KB UMD_PROD
ReactDOMForked-dev.js +0.1% +0.1% 981.76 KB 982.59 KB 218.17 KB 218.36 KB FB_WWW_DEV
ReactDOMForked-prod.js 0.0% -0.0% 410.04 KB 410.04 KB 74.52 KB 74.52 KB FB_WWW_PROD
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 3.68 KB 3.68 KB 1.33 KB 1.33 KB NODE_DEV
react-dom.development.js +0.1% +0.1% 902.41 KB 903.19 KB 198.57 KB 198.75 KB UMD_DEV
ReactDOMForked-profiling.js 0.0% -0.0% 427.69 KB 427.69 KB 77.63 KB 77.63 KB FB_WWW_PROFILING
react-dom-server.browser.development.js 0.0% -0.0% 135.83 KB 135.83 KB 34.97 KB 34.97 KB UMD_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% -0.2% 1.15 KB 1.15 KB 654 B 653 B NODE_PROD
react-dom.production.min.js 0.0% -0.0% 118.25 KB 118.25 KB 37.99 KB 37.99 KB UMD_PROD
react-dom-server.browser.production.min.js 0.0% -0.0% 20.16 KB 20.16 KB 7.46 KB 7.46 KB UMD_PROD
react-dom.profiling.min.js 0.0% -0.0% 121.96 KB 121.96 KB 39.19 KB 39.18 KB UMD_PROFILING
ReactDOMTesting-dev.js +0.1% +0.1% 918.23 KB 919.06 KB 204.8 KB 204.98 KB FB_WWW_DEV
react-dom.development.js +0.1% +0.1% 858.87 KB 859.63 KB 196.07 KB 196.25 KB NODE_DEV
react-dom-server.browser.development.js 0.0% -0.0% 128.87 KB 128.87 KB 34.52 KB 34.52 KB NODE_DEV
react-dom.production.min.js 0.0% -0.0% 118.32 KB 118.32 KB 37.19 KB 37.19 KB NODE_PROD
react-dom-test-utils.development.js 0.0% -0.0% 59.83 KB 59.83 KB 15.85 KB 15.85 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 20.07 KB 20.07 KB 7.42 KB 7.42 KB NODE_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.2% 3.34 KB 3.34 KB 1.26 KB 1.26 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 12.43 KB 12.43 KB 4.59 KB 4.59 KB UMD_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.1% 1.17 KB 1.17 KB 691 B 690 B UMD_PROD
ReactDOM-dev.js +0.1% +0.1% 981.76 KB 982.59 KB 218.17 KB 218.36 KB FB_WWW_DEV
ReactDOMServer-dev.js 0.0% -0.0% 139.01 KB 139.01 KB 35.48 KB 35.48 KB FB_WWW_DEV
ReactDOM-prod.js 0.0% -0.0% 410.04 KB 410.04 KB 74.52 KB 74.52 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% -0.0% 55.27 KB 55.27 KB 15.23 KB 15.23 KB NODE_DEV
ReactDOMServer-prod.js 0.0% -0.0% 47.71 KB 47.71 KB 11.11 KB 11.11 KB FB_WWW_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.2% 2.94 KB 2.94 KB 1.17 KB 1.17 KB NODE_DEV
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 55.21 KB 55.21 KB 14.3 KB 14.3 KB NODE_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.1% 10.04 KB 10.04 KB 3.37 KB 3.37 KB NODE_PROD
react-dom-server.node.development.js 0.0% -0.0% 130.09 KB 130.09 KB 34.77 KB 34.77 KB NODE_DEV
react-dom-server.node.production.min.js 0.0% -0.0% 20.48 KB 20.48 KB 7.57 KB 7.57 KB NODE_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js +0.1% +0.1% 650.45 KB 651.29 KB 140.6 KB 140.79 KB RN_OSS_DEV
ReactNativeRenderer-prod.js 0.0% -0.0% 267.56 KB 267.56 KB 46.51 KB 46.51 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js 0.0% -0.0% 279.35 KB 279.35 KB 48.77 KB 48.77 KB RN_OSS_PROFILING
ReactFabric-dev.js +0.1% +0.1% 632.31 KB 633.15 KB 136.26 KB 136.43 KB RN_OSS_DEV
ReactFabric-prod.js 0.0% -0.0% 259.54 KB 259.54 KB 45.04 KB 45.04 KB RN_OSS_PROD
ReactFabric-profiling.js 0.0% -0.0% 271.34 KB 271.34 KB 47.28 KB 47.28 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% 16.24 KB 16.24 KB 4.96 KB 4.96 KB NODE_DEV
react-reconciler-reflection.production.min.js 0.0% -0.1% 2.8 KB 2.8 KB 1.2 KB 1.2 KB NODE_PROD
react-reconciler.development.js +0.1% +0.2% 574.5 KB 575.25 KB 121.31 KB 121.5 KB NODE_DEV
react-reconciler.production.min.js 0.0% -0.0% 76.2 KB 76.2 KB 22.56 KB 22.55 KB NODE_PROD

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

Size changes (stable)

Generated by 🚫 dangerJS against e81ae47

@sizebot
Copy link

sizebot commented Mar 15, 2020

Details of bundled changes.

Comparing: 730389b...e81ae47

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js +0.1% +0.1% 570.34 KB 571.12 KB 118.56 KB 118.74 KB UMD_DEV
react-test-renderer.production.min.js 0.0% -0.0% 73.54 KB 73.54 KB 22.42 KB 22.42 KB UMD_PROD
react-test-renderer-shallow.development.js 0.0% 0.0% 38.4 KB 38.4 KB 9.3 KB 9.3 KB UMD_DEV
react-test-renderer.development.js +0.1% +0.1% 543.59 KB 544.35 KB 117.18 KB 117.35 KB NODE_DEV
react-test-renderer.production.min.js 0.0% -0.0% 73.36 KB 73.36 KB 22.09 KB 22.08 KB NODE_PROD
ReactTestRenderer-dev.js +0.1% +0.2% 570.92 KB 571.75 KB 120.41 KB 120.59 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.0% -0.0% 126.57 KB 126.57 KB 39.59 KB 39.59 KB NODE_PROFILING
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 3.35 KB 3.35 KB 1.27 KB 1.27 KB UMD_DEV
ReactDOM-dev.js +0.1% +0.1% 935.88 KB 936.72 KB 208.26 KB 208.46 KB FB_WWW_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1.19 KB 1.19 KB 700 B 698 B UMD_PROD
react-dom-server.browser.development.js 0.0% -0.0% 137.42 KB 137.42 KB 35.17 KB 35.17 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 20.62 KB 20.62 KB 7.54 KB 7.54 KB UMD_PROD
react-dom-server.browser.development.js 0.0% -0.0% 130.38 KB 130.38 KB 34.74 KB 34.74 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 20.53 KB 20.53 KB 7.5 KB 7.5 KB NODE_PROD
react-dom.development.js +0.1% +0.1% 932.89 KB 933.67 KB 203.83 KB 204.01 KB UMD_DEV
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 58.24 KB 58.24 KB 14.54 KB 14.54 KB UMD_DEV
react-dom.production.min.js 0.0% -0.0% 122.45 KB 122.45 KB 39.14 KB 39.14 KB UMD_PROD
ReactDOMForked-dev.js +0.1% +0.1% 935.88 KB 936.72 KB 208.26 KB 208.46 KB FB_WWW_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.1% 10.32 KB 10.32 KB 3.5 KB 3.49 KB UMD_PROD
ReactDOMServer-dev.js 0.0% -0.0% 138.16 KB 138.16 KB 35.34 KB 35.34 KB FB_WWW_DEV
react-dom.profiling.min.js 0.0% -0.0% 126.28 KB 126.28 KB 40.39 KB 40.39 KB UMD_PROFILING
ReactDOMForked-prod.js 0.0% -0.0% 383.62 KB 383.62 KB 69.79 KB 69.79 KB FB_WWW_PROD
ReactDOMServer-prod.js 0.0% -0.0% 47.01 KB 47.01 KB 10.93 KB 10.93 KB FB_WWW_PROD
react-dom.development.js +0.1% +0.1% 888.08 KB 888.84 KB 201.33 KB 201.5 KB NODE_DEV
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 55.23 KB 55.23 KB 14.31 KB 14.31 KB NODE_DEV
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 3.69 KB 3.69 KB 1.34 KB 1.34 KB NODE_DEV
react-dom.production.min.js 0.0% -0.0% 122.59 KB 122.59 KB 38.31 KB 38.3 KB NODE_PROD
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.1% 10.05 KB 10.05 KB 3.38 KB 3.38 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% -0.2% 1.16 KB 1.16 KB 663 B 662 B NODE_PROD
ReactDOM-prod.js 0.0% -0.0% 383.62 KB 383.62 KB 69.79 KB 69.79 KB FB_WWW_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.2% 2.95 KB 2.95 KB 1.18 KB 1.18 KB NODE_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.2% 1 KB 1 KB 611 B 610 B NODE_PROD
react-dom-test-utils.development.js 0.0% -0.0% 59.84 KB 59.84 KB 15.86 KB 15.86 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 12.44 KB 12.44 KB 4.6 KB 4.6 KB UMD_PROD
ReactDOMTesting-dev.js +0.1% +0.1% 891.57 KB 892.41 KB 199.31 KB 199.49 KB FB_WWW_DEV
ReactDOMTesting-prod.js 0.0% -0.0% 377.38 KB 377.38 KB 68.99 KB 68.99 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% -0.0% 55.29 KB 55.29 KB 15.24 KB 15.24 KB NODE_DEV
ReactDOMTesting-profiling.js 0.0% -0.0% 377.38 KB 377.38 KB 68.99 KB 68.99 KB FB_WWW_PROFILING
react-dom-server.node.development.js 0.0% -0.0% 131.6 KB 131.6 KB 34.99 KB 34.99 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 12.3 KB 12.3 KB 4.53 KB 4.53 KB NODE_PROD
react-dom-server.node.production.min.js 0.0% -0.0% 20.94 KB 20.94 KB 7.65 KB 7.65 KB NODE_PROD

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-dev.js +0.1% +0.2% 570.57 KB 571.41 KB 119.49 KB 119.68 KB FB_WWW_DEV
ReactART-prod.js 0.0% -0.0% 233.29 KB 233.29 KB 39.82 KB 39.82 KB FB_WWW_PROD
react-art.development.js +0.1% +0.1% 653.81 KB 654.58 KB 137.02 KB 137.2 KB UMD_DEV
react-art.production.min.js 0.0% -0.0% 109.25 KB 109.25 KB 33.1 KB 33.1 KB UMD_PROD
react-art.development.js +0.1% +0.1% 557.12 KB 557.88 KB 119.41 KB 119.58 KB NODE_DEV
react-art.production.min.js 0.0% -0.0% 74.24 KB 74.24 KB 22.26 KB 22.25 KB NODE_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js +0.1% +0.1% 653.17 KB 654.01 KB 140.95 KB 141.14 KB RN_FB_DEV
ReactNativeRenderer-prod.js 0.0% -0.0% 267.71 KB 267.71 KB 46.54 KB 46.54 KB RN_FB_PROD
ReactNativeRenderer-profiling.js 0.0% -0.0% 279.51 KB 279.51 KB 48.8 KB 48.8 KB RN_FB_PROFILING
ReactFabric-dev.js +0.1% +0.1% 632.32 KB 633.16 KB 136.27 KB 136.44 KB RN_OSS_DEV
ReactFabric-prod.js 0.0% -0.0% 259.55 KB 259.55 KB 45.05 KB 45.05 KB RN_OSS_PROD
ReactFabric-profiling.js 0.0% -0.0% 271.35 KB 271.35 KB 47.29 KB 47.28 KB RN_OSS_PROFILING
ReactFabric-dev.js +0.1% +0.1% 635.04 KB 635.88 KB 136.59 KB 136.77 KB RN_FB_DEV
ReactFabric-prod.js 0.0% -0.0% 259.7 KB 259.7 KB 45.08 KB 45.08 KB RN_FB_PROD
ReactNativeRenderer-dev.js +0.1% +0.1% 650.46 KB 651.3 KB 140.61 KB 140.8 KB RN_OSS_DEV
ReactFabric-profiling.js 0.0% -0.0% 271.5 KB 271.5 KB 47.31 KB 47.31 KB RN_FB_PROFILING
ReactNativeRenderer-prod.js 0.0% -0.0% 267.57 KB 267.57 KB 46.51 KB 46.51 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js 0.0% -0.0% 279.37 KB 279.37 KB 48.78 KB 48.78 KB RN_OSS_PROFILING

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler.development.js +0.1% +0.1% 596.95 KB 597.71 KB 125.56 KB 125.73 KB NODE_DEV
react-reconciler-reflection.development.js 0.0% -0.0% 16.25 KB 16.25 KB 4.97 KB 4.96 KB NODE_DEV
react-reconciler.production.min.js 0.0% -0.0% 79.29 KB 79.29 KB 23.31 KB 23.31 KB NODE_PROD
react-reconciler-reflection.production.min.js 0.0% -0.2% 2.81 KB 2.81 KB 1.21 KB 1.21 KB NODE_PROD

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

Size changes (experimental)

Generated by 🚫 dangerJS against e81ae47

@gaearon
Copy link
Collaborator

gaearon commented Mar 15, 2020

Can we use workInProgress which is already available locally rather than read current owner?

@JoviDeCroock JoviDeCroock marked this pull request as ready for review March 15, 2020 17:36
@JoviDeCroock
Copy link
Contributor Author

@gaearon Thanks for the advice, I had to guard it for Flow tho

@gaearon gaearon merged commit 95df39b into facebook:master Mar 16, 2020
@JoviDeCroock JoviDeCroock deleted the improve-error branch March 16, 2020 17:06
acdlite pushed a commit to acdlite/react that referenced this pull request Mar 19, 2020
…k#18316)

* improve error message for cross-functional component updates

* correctly use %s by quoting it

* use workInProgress and lint

* add test assertion

* fix test

* Improve the error message

Co-authored-by: Dan Abramov <dan.abramov@me.com>
acdlite pushed a commit to acdlite/react that referenced this pull request Mar 19, 2020
…k#18316)

* improve error message for cross-functional component updates

* correctly use %s by quoting it

* use workInProgress and lint

* add test assertion

* fix test

* Improve the error message

Co-authored-by: Dan Abramov <dan.abramov@me.com>
This was referenced Mar 15, 2021
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.

None yet

4 participants