mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[RTR] Add usage warning behind flag (#27903)
## Summary
Moving towards deprecation of ReactTestRenderer. Log a warning on each
render so we can remove the exports in a future major version.
We can enable this flag in web RTR without disrupting RN tests by
flipping the flag in
`packages/shared/forks/ReactFeatureFlags.test-renderer.js`
## How did you test this change?
`yarn test
packages/react-test-renderer/src/__tests__/ReactTestRenderer-test.js`
DiffTrain build for [66c8346401](https://github.com/facebook/react/commit/66c8346401d271588e4c400921c5dab5478fc623)
This commit is contained in:
@@ -1 +1 @@
|
||||
aaf85f3af8c30252edaab5c24975cd086937b2a4
|
||||
66c8346401d271588e4c400921c5dab5478fc623
|
||||
|
||||
@@ -387,6 +387,7 @@ export default [
|
||||
"memo: The first argument must be a component. Instead received: %s",
|
||||
"onError returned something with a type other than \"string\". onError should return a string and may return null or undefined but must not return anything else. It received something of type \"%s\" instead",
|
||||
"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",
|
||||
"react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer",
|
||||
"render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",
|
||||
"render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.",
|
||||
"render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render.",
|
||||
|
||||
Reference in New Issue
Block a user