recompose icon indicating copy to clipboard operation
recompose copied to clipboard

React.createFactory is deprecated

Open Hypnosphi opened this issue 4 years ago • 12 comments

https://reactjs.org/blog/2020/02/26/react-v16.13.0.html#deprecating-reactcreatefactory

React.createFactory is a legacy helper for creating React elements. This release adds a deprecation warning to the method. It will be removed in a future major version.

Hypnosphi avatar Mar 02 '20 19:03 Hypnosphi

@acdlite @istarkov @wuct Can you please review? I guess it qualifies as

patches for compatibility with future React releases

Hypnosphi avatar Mar 06 '20 13:03 Hypnosphi

Any update on this?

kopax avatar Apr 21 '20 16:04 kopax

Looks like a pretty simple review + merge, could @acdlite @wuct or @istarkov please merge in the name of "patches for compatibility with future React releases"? 🙏🧁💓

ericsoco avatar Apr 28 '20 05:04 ericsoco

Anything I can do to help with merging this one? This warning spams our tests / runtime...

vzaidman avatar May 06 '20 14:05 vzaidman

Can We help to fix this?

MikeAliG avatar May 11 '20 18:05 MikeAliG

Hello,

it seems that this repository is not maintained any more. I have just created this new one npm package (https://www.npmjs.com/package/myapos_recompose) that is forked from the original recompose. It contains the fix that @Hypnosphi mentioned.

If you want you can check it in the following url: https://github.com/myapos/recompose

I already checked it in my projects and it seems that the deprecation warning is resolved.

Also I in order to preserve all the imports from recompose and reduce refactoring in my source code, I used an alias in .babelrc, in order to resolve the package from my npm package along with the https://github.com/tleunen/babel-plugin-module-resolver as follows:

[
      "module-resolver",
      {
        "alias": {
          "recompose": "./node_modules/myapos_recompose"
        }
      }
]

I hope that helps.

myapos avatar May 13 '20 15:05 myapos

I also published my fork to npm as @hypnosphi/recompose

Hypnosphi avatar May 13 '20 16:05 Hypnosphi

I also published my fork to npm as @hypnosphi/recomose

Thanks for publishing this @Hypnosphi 🙌 , for anyone else who tried to copy and paste that forked package name, the p is missing and @Hypnosphi did publish it correctly (without typo) as @hypnosphi/recompose :)

Koleok avatar Jun 09 '20 16:06 Koleok

@myapos Is it your recommendation to use @Hypnosphi package? I liked that your version updated the package.json fields to point to your fork, but your main and module keys resolve to dist/Recompose.x.js, while your actual dist folder contains files MyaposRecompose.x.js... So webpack aliasing doesn't work.

daleyjem avatar Sep 21 '20 22:09 daleyjem

@acdlite @istarkov @wuct any news?

syabro avatar Oct 22 '20 13:10 syabro

@Hypnosphi wow it seems like you can merge :O

Thank you to whoever is involved in bringing the library to life.

At least to deal with the deprecations...

vzaidman avatar Jan 13 '21 07:01 vzaidman

Looks like @Naismith is not a maintainer of this repo, so unfortunately his approval doesn't count. And I wouldn't be able to merge even if he was, only maintainers can do that

Hypnosphi avatar Jan 13 '21 13:01 Hypnosphi