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

Warn when Using String Refs #16217

Merged
merged 10 commits into from
Aug 7, 2019
Merged

Conversation

lunaruan
Copy link
Contributor

As part of the process to deprecate string refs (as per a larger proposal outlined here), expand string ref warning to fire for everyone who uses string refs (not just people on strict mode) to notify them of planned deprecation changes.

@sizebot
Copy link

sizebot commented Jul 26, 2019

Details of bundled changes.

Comparing: 05dce75...fb04bc8

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-art.development.js +0.1% +0.1% 647.32 KB 647.94 KB 141.23 KB 141.37 KB UMD_DEV
react-art.production.min.js 0.0% -0.0% 102.36 KB 102.36 KB 31.24 KB 31.24 KB UMD_PROD
react-art.development.js +0.1% +0.1% 578.2 KB 578.82 KB 123.81 KB 123.94 KB NODE_DEV
react-art.production.min.js 0.0% -0.0% 67.41 KB 67.41 KB 20.56 KB 20.56 KB NODE_PROD
ReactART-dev.js +0.1% +0.1% 592.52 KB 593.32 KB 123.45 KB 123.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% 115.09 KB 115.09 KB 36.24 KB 36.24 KB NODE_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 138.51 KB 138.51 KB 36.43 KB 36.43 KB UMD_DEV
ReactDOM-dev.js +0.1% +0.1% 933.75 KB 934.55 KB 206.39 KB 206.55 KB FB_WWW_DEV
react-dom-test-utils.production.min.js 0.0% -0.1% 11.19 KB 11.19 KB 4.11 KB 4.11 KB UMD_PROD
react-dom-test-utils.production.min.js 0.0% -0.0% 10.97 KB 10.97 KB 4.04 KB 4.04 KB NODE_PROD
react-dom.development.js +0.1% +0.1% 909.98 KB 910.6 KB 206.26 KB 206.4 KB UMD_DEV
react-dom.production.min.js 0.0% -0.0% 111.47 KB 111.47 KB 35.86 KB 35.86 KB UMD_PROD
react-dom.profiling.min.js 0.0% -0.0% 114.88 KB 114.88 KB 36.88 KB 36.88 KB UMD_PROFILING
react-dom.development.js +0.1% +0.1% 904.28 KB 904.9 KB 204.67 KB 204.81 KB NODE_DEV
react-dom-server.node.development.js 0.0% 0.0% 136.57 KB 136.57 KB 36.04 KB 36.04 KB NODE_DEV
react-dom.production.min.js 0.0% -0.0% 111.45 KB 111.45 KB 35.29 KB 35.29 KB NODE_PROD
ReactDOM-prod.js 0.0% 0.0% 372 KB 372 KB 68.34 KB 68.34 KB FB_WWW_PROD
react-dom-server.browser.development.js 0.0% 0.0% 134.64 KB 134.64 KB 35.5 KB 35.5 KB NODE_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.0% 10.74 KB 10.74 KB 3.68 KB 3.68 KB UMD_PROD
ReactDOMServer-prod.js 0.0% 0.0% 46.68 KB 46.68 KB 10.83 KB 10.83 KB FB_WWW_PROD
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.0% 10.48 KB 10.48 KB 3.58 KB 3.58 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% -0.1% 1.1 KB 1.1 KB 668 B 667 B NODE_PROD

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactTestRenderer-dev.js +0.1% +0.1% 603.47 KB 604.27 KB 125.89 KB 126.04 KB FB_WWW_DEV
react-test-renderer-shallow.development.js 0.0% -0.0% 39.51 KB 39.51 KB 9.95 KB 9.95 KB UMD_DEV
react-test-renderer.development.js +0.1% +0.1% 591.1 KB 591.72 KB 126.39 KB 126.53 KB UMD_DEV
react-test-renderer.production.min.js 0.0% -0.0% 68.92 KB 68.92 KB 21.08 KB 21.08 KB UMD_PROD
react-test-renderer.development.js +0.1% +0.1% 586.64 KB 587.26 KB 125.3 KB 125.43 KB NODE_DEV
react-test-renderer.production.min.js 0.0% -0.0% 68.66 KB 68.66 KB 20.86 KB 20.86 KB NODE_PROD

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler.development.js +0.1% +0.1% 576.28 KB 576.9 KB 122.36 KB 122.5 KB NODE_DEV
react-reconciler.production.min.js 0.0% -0.0% 68.66 KB 68.66 KB 20.42 KB 20.42 KB NODE_PROD
react-reconciler-reflection.development.js 0.0% -0.0% 16.63 KB 16.63 KB 5.16 KB 5.16 KB NODE_DEV
react-reconciler-persistent.development.js +0.1% +0.1% 573.29 KB 573.91 KB 121.1 KB 121.24 KB NODE_DEV

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-profiling.js 0.0% 0.0% 281.01 KB 281.01 KB 48.25 KB 48.26 KB RN_OSS_PROFILING
ReactFabric-profiling.js 0.0% 0.0% 274.07 KB 274.07 KB 47.11 KB 47.12 KB RN_OSS_PROFILING
ReactFabric-dev.js +0.1% +0.1% 737.34 KB 738.14 KB 155.78 KB 155.92 KB RN_FB_DEV
ReactNativeRenderer-dev.js +0.1% +0.1% 726.5 KB 727.3 KB 153.69 KB 153.83 KB RN_OSS_DEV
ReactNativeRenderer-dev.js +0.1% +0.1% 726.59 KB 727.39 KB 153.74 KB 153.88 KB RN_FB_DEV
ReactNativeRenderer-profiling.js 0.0% 0.0% 281 KB 281 KB 48.26 KB 48.26 KB RN_FB_PROFILING
ReactFabric-dev.js +0.1% +0.1% 737.24 KB 738.04 KB 155.74 KB 155.88 KB RN_OSS_DEV

Generated by 🚫 dangerJS

false,
'Component "%s" contains the string ref "%s". Support for string refs ' +
'will be removed in a future major release. We recommend using ' +
'createRef() instead.' +
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe mention useRef instead? Or at least also.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah it’s a common mistake to put createRef into a function component

@lunaruan lunaruan merged commit c4f0b93 into facebook:master Aug 7, 2019
@facebook facebook deleted a comment Aug 7, 2019
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.

6 participants