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

createFactory is deprecated Warning in react 16.13.1 #4731

Closed
macrozone opened this issue Apr 27, 2020 · 2 comments
Closed

createFactory is deprecated Warning in react 16.13.1 #4731

macrozone opened this issue Apr 27, 2020 · 2 comments

Comments

@macrozone
Copy link
Contributor

macrozone commented Apr 27, 2020

What you were expecting:

No warnings

What happened instead:

      Warning: React.createFactory() is deprecated and will be removed in a future ma
jor release. Consider using JSX or use React.createElement() directly instead.

      at printWarning (packages/dataprovider/node_modules/react/cjs/react.development
.js:315:30)
      at warn (node_modules/react/cjs/react.development.js:278:5)
      at createFactoryWithValidation (node_modules/react/cjs/react.development.js:1827:7)
      at node_modules/recompose/shouldUpdate.js:25:44
      at Object.pure [as default] (node_modules/recompose/pure.js:29:97)
      at Object.<anonymous> (node_modules/ra-core/lib/util/FieldTitle.js:19:33)

Steps to reproduce:

update to react 16.13.1

Related code:

its actually an upstream issue from recompose: acdlite/recompose#795

unforunatly, the pull request is not merged and it does not seem to be active.

an alternative would be to use React.memo instead of pure from recompose

Environment

  • React-admin version: 3.4.1
  • Last version that did not exhibit the issue (if applicable):
  • React version: 16.13.1
  • Browser: chrome 80
  • Stack trace (in case of a JS error): see above
@djhi
Copy link
Collaborator

djhi commented Apr 28, 2020

Yes, I noticed those annoying warnings as well. Now that most of our components use hooks, we can probably remove recompose.

@fzaninotto
Copy link
Member

Fixed by #4786

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants