React JS Tutorial - 5 - Calling a function of other component

preview_player
Показать описание
In this video, we talk about calling a function of a component from its parent or child component.

Рекомендации по теме
Комментарии
Автор

I thought that I will not find such content. Thank you very muchhh. It is so much useful

aminatmoldalieva
Автор

Amazing! I was looking for a way to call a function of a component from it's parent, and this saved my day. thank you man

tarik
Автор

is it possible to call a functions of a child component in onther child component

YGaming
Автор

Wonderful tutorial, It really help me to solve my problem.

Thanks a lot Kamran

muhammadjonnazarov
Автор

Thank you! learned a new trick in react

shainesmajer
Автор

I used this with a custom component, to change the button text from the parent,
When I use more than one custom button the data I pass through only updates the last button in the dom,
If I comment out the last <Button /> the first works as expected. Would you know how to solve this?
More Info: I made a custom Select Component, everything works except when useEffect triggers the text change for callChildFunction(), with setText useState passed in by a prop .
If you get this thanks for any feedback.

avertry
Автор

how can we do this in sibling component??

namanrajput