Answer the question
In order to leave comments, you need to log in
How to call a method in a child component by ref if connect is registered in child?
Good afternoon. I know that you can call a method in child by ref from the parent component if connect redux is not registered. But here's how to call the method if connect is registered? I tried to output the ref to the console and look at its methods and I did not find my function.
Answer the question
In order to leave comments, you need to log in
You can pass the withRef option to connect :
You need to get the ref of the component passed to connect like this:
where
someRefName is the ref received from connect . getWrappedInstance will only be callable if you pass the withRef option .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question