DEV Community

loading...

Discussion on: Hot to call this function from another component in react?

Collapse
welingtonms profile image
Welington Silva

It's a good thing to bind first this function in your constructor, so you won't have a scope problem.

Then you can create a ref in the "another component" and apply it to this component where you have this function. Then you can call this.yourRef.current.uCyr()

Collapse
ivkemilioner profile image