-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Using HOC with Wrapper Forwarding refs via es7 Decorators. Throw error "Expected a constructor" #24452
Comments
Can you run If you believe this information is irrelevant to the reported issue, you may write `[skip envinfo]` alongside an explanation in your Environment: section.
|
Same issue for enhancer HOC (as decorator) with new react-redux package (ver 7). I have debugged the issue and found out that react-proxy library checks type of components and assumes that they are functions. Assumption is not quite up to date considering react memoized components (js objects, not functions), react-redux 'connect' function returning memo component and other cases when |
hey everyone, it seems that this is basically a duplicate of #24553 and I'd like to keep the redundancy low, I'll write a follow up comment over there. |
0.61 is out with a fix. |
🐛 Bug Report
Using HOC with Wrapper Forwarding refs via es7 Decorators will throw Expected a constructor error.
To Reproduce
Code Example
Environment
react: 16.8.3,
react-native: 0.59.1
@babel/plugin-proposal-decorators: 7.4.0
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (4) x64 Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz
Memory: 25.50 MB / 8.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.2.0 - ~/.nvm/versions/node/v10.2.0/bin/node
Yarn: 1.10.1 - ~/.nvm/versions/node/v10.2.0/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.2.0/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
Android SDK:
API Levels: 25, 26, 27, 28
Build Tools: 26.0.0, 26.0.2, 27.0.3, 28.0.3
IDEs:
Android Studio: 3.1 AI-173.4720617
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmGlobalPackages:
react-native-cli: 2.0.1
The text was updated successfully, but these errors were encountered: