Hi all, today I updated my react project to v16.13, and now my tests that make use of enzyme helpers, began to give me this warning:
Warning: React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.
Not showing the warning when using enzyme.
Ubuntu 18.04
node v12.16.1 (LTS)
npm v6.13.4 (LTS)
| library | version
| ------------------- | -------
| enzyme | 6.8.0
| react | 16.13.0
| react-dom | 16.13.0
This is confusing - the only part of enzyme that looks at createFactory is inside our own tests, which you wouldn't be exercising.
Is there a stack trace at all? It's possible it's coming in from a dependency we use, or it's coming from an independent enzyme matchers package, or enzyme-to-json, or similar.
The whole stack trace is this:
/node_modules/react/cjs/react.development.js
Sorry, probably it is not enzyme fault, but I search in all of my testing dependencies and the only one that uses React.createFactory is enzyme... You can close this issue if you want.
Update, I found the guilty library, it is recompose which is a dependency of @material-ui/core that I am using in my components, so I guess I have to address this issue to material-ui.
Most helpful comment
Update, I found the guilty library, it is recompose which is a dependency of @material-ui/core that I am using in my components, so I guess I have to address this issue to material-ui.