Answer the question
In order to leave comments, you need to log in
How to call a child component method inside the parent component in react?
Hello. I'm new to development, learning react and would like to ask what is the right way in this solution?
I have a parent component that has a button. In the parent component, there is a child component that has its own method.
I'm trying to make it so that when you click on a button that is in the parent, the method that is in the chail is called.
Please tell me if it is possible to do this and whether it is right to do it, because I read that in React data is transferred from parent to child, and not from child to parent.
Thanks for the help.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question