-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
"getWrappedInstance is not a function" #1053
Comments
|
The test you referenced expects an error to occur with the given line:
The test says why: "To access the wrapped instance, you need to specify { withRef: true } in the options argument of the connect() call" However, in the newest version of So if |
Nevermind, I don't know how I missed it, but it's just been replaced by the |
I got this error recently, it was not a problem before. I use version 5.0.5 and never downgrade or update. Implement it using |
@archansel Did you ever figure this out? I just installed redux v4 and react-redux v5 into an existing project and all the |
Component
Usage
Redux |
Greetings,
I want to use Ref on my connect components. A search through google finds everyone suggesting to pass {withRef: true} as the 4th argument to connect() and then use ref. getWrappedInstance() to access the wrapped instance of the component.
However, when I try it I'm getting "getWrappedInstance is not a function". I read through the docs, is getRef only available in advancedConnect() now?
I attempted to use advancedConnect but the documentation for selectorFactory is difficult to understand and I couldn't make the change from connect to advancedConnect.
Here is my code snippet:
export default connect(mapStateToProps, mapDispatchToProps, null, { withRef: true })(Element);
and ref.getWrappedInstance() simple gives me "getWrappedInstance is not a function".
The text was updated successfully, but these errors were encountered: