How to access to actual Component when using ref a

2019-07-11 14:40发布

问题:

We have a ref to a react component and want to call a method of this component. When using the ref it is a "ProxyComponent" object. How can I use it as my actual component or what to do to be able to do this. I saw, that there is the attribute "renderedElement" and inside the attribute "type" which is the correct type of my actual component. But I didnt find a way to use it like this/to call my components methods.

标签: reactjs ref refs