react icon indicating copy to clipboard operation
react copied to clipboard

[RTR] Enable warning flag

Open jackpope opened this issue 1 year ago • 1 comments

Summary

Based on

  • https://github.com/facebook/react/pull/27903

This PR

  • Silence warning in React tests
  • Turn on flag

We want to finish cleaning up internal RTR usage, but let's prioritize the deprecation process. We do this by silencing the internal warning for now.

How did you test this change?

yarn build yarn test ReactHooksInspectionIntegration -b

jackpope avatar Feb 22 '24 17:02 jackpope

Comparing: dbfbfb3312db019183ef92fd2ef110cc7d807e80...6b5e14c9efdb6e063b648e1266a2453f0ae83a5d

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 176.92 kB 176.92 kB = 54.94 kB 54.94 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 173.32 kB 173.32 kB = 54.06 kB 54.06 kB
facebook-www/ReactDOM-prod.classic.js = 595.14 kB 595.14 kB = 104.51 kB 104.51 kB
facebook-www/ReactDOM-prod.modern.js = 578.40 kB 578.40 kB = 101.53 kB 101.53 kB
test_utils/ReactAllWarnings.js Deleted 65.55 kB 0.00 kB Deleted 16.18 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 65.55 kB 0.00 kB Deleted 16.18 kB 0.00 kB

Generated by :no_entry_sign: dangerJS against 6b5e14c9efdb6e063b648e1266a2453f0ae83a5d

react-sizebot avatar Feb 22 '24 17:02 react-sizebot

Doesn't this also issue this warning when you'd use @testing-library/react-native? Are they expected to catch this warning? Otherwise the warning is noise for @testing-library/react-native users since they're not using a deprecated API directly. You're not supposed to move off of @testing-library/react-native but rather from bare react-test-renderer usage to @testing-library/react-native, no?

eps1lon avatar Mar 23 '24 13:03 eps1lon

@eps1lon yeah good point, @jackpope and I talked about that, we're going to address that before merging this so @testing-library/react-native doesn't get the warning message, either with a global like act sets or by publishing a separate react-native-test-renderer package.

rickhanlonii avatar Mar 23 '24 14:03 rickhanlonii