recompose
recompose copied to clipboard
Fix hoistStatics hoisting statics of react ^16.3 features
[email protected] does not support forwardRef components, contextType static nor getDerivedStateFromError static. The major version bump was due to the added requirement of react >= 0.14 which was dropped in [email protected]. Therefore this change should not be breaking.
@eps1lon @acdlite @wuct Any chance we can merge and publish this? :) Would love to start using contextType along with recompose.
@eps1lon Would be great to update to version hoist-non-react-statics 3.3.0 now. ^_^
I can update the version in this PR but I have no permissions in this repository to merge or publish. I originally thought the deprecation would at least include bug fixes for a short amount of time but it seems like this isn't the case either.
We used the resolutions field to force a higher version of hoist-non-react-statics but you would have to check if this is supported outside of yarn.
For now no maintener uses recompose in any env. In my case I havent used it more than 2 years. In such case its almost impossible to find any good to spend my free time on this project. As even this simple case is not just merging, it seriously increases library size, it has no tests - what we achieve adding this. React, flowtype and many others dev dependencies has changed a lot since last fixes, so Im sorry but it wont be merged.
so Im sorry but it wont be merged.
will it not be merged because of size increase or because of missing tests? Because I can add a test that is only testing a dependency if this is the only blocker. As to size increase: I would argue that a correct program is more important than a small program.
Just checked: The size diff is because .size-snapshot is outdated on master. If it would be up-to-date then this PR wouldn't affect it.
@istarkov @eps1lon I'm not sure this PR demands much testing, if any. There are also no existing tests in the library checking that React statics are not copied, since I believe this is taken for granted since it's the purpose of the library: https://github.com/acdlite/recompose/blob/master/src/packages/recompose/tests/hoistStatics-test.js
Either way, adding a test should be doable. Would love to keep using recompose in our library but upgrade React. 🤔
OK But anyway, just read this: https://github.com/acdlite/recompose#a-note-from-the-author-acdlite-oct-25-2018
OK But anyway, just read this: https://github.com/acdlite/recompose#a-note-from-the-author-acdlite-oct-25-2018
It says: "I will be discontinuing active maintenance of this package (excluding perhaps bugfixes or patches for compatibility with future React releases)" This PR does exactly that, it would be great to see it merged :)
Additionally, having such an outdated dependency on a widely-used package causes all kinds of weird problems with other packages depending on newer versions of react-hoist-statics in a typed environment.