-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Dependency hoist-non-react-statics is outdated, causes type issues #994
Description
Hi software-mansion & gesture-handler maintainers.. thank you for this essential library!
The issue: the "hoist-non-react-statics": "^2.3.1" dependency causes tricky type issues when used in combination with certain type packages, like @types/react-redux>=7.1.0. That package relies on hoist-non-react-statics ^3.3.0, and when both versions are installed, connect() loses it's type information, always returning any;
This issue is slightly beyond the scope of this library, so if there is a reason to leave hoist-non-react-statics at 2.x.x, please feel free to close this.
Related issues:
DefinitelyTyped/DefinitelyTyped#37414
DefinitelyTyped/DefinitelyTyped#36873
Workaround:
Consuming projects can specify an explicit dependency on "hoist-non-react-statics": "^3.3.0". Or, if using yarn, the resolutions key in package.json can be used to force 3.3+
Not a huge deal, but it looks like there is no breaking changes in hoist v2->v3, and keeping dependencies fresh is probably a good thing. I'm submitting a PR to go with this issue as well -- it looks like the detox tests are passing just fine with the upgraded dependency.
Thanks for your time!