React - How to Pass Functions between Components - Episode 22

preview_player
Показать описание
This tutorial explains how you can pass functions from one component to another. We do this because the functions that control one components state have to reside in the same component as the state. So, if one component needs to update the state of another then it needs to have the function from the first component.

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

Thank you man, I was trying to pass a function to a child for more than two days. Now I understood that I should pass it again to parent in order to make it work

MrAmr
Автор

You have a wonderful voice. Calmed me to a semi sane state. Thank you from all my heart <3

tadaskuzminskas
Автор

Thank you so much Steve. This was such a clear explanation of how simple passing a function can be. I feel a lot more confident about using functions in React after seeing this.

kameronfreitag
Автор

I really like the way you explain the logic. Thank you.

Bertie
Автор

Super helpful! Very clear explanation. Thank you.

arturhazratov
Автор

Great explanation and you have a great voice tone and cadence for teaching!!! Subscribed!

KanecoV
Автор

thank you very very very extremely very much. I was troubled about this for days.

maldamotuma
Автор

Thank you for the great video explanation!

marcoszanre
Автор

thank you steve .. you helped me too much

kna
Автор

Thanks Steve, this is a Good exercice. I'm going to do it without watching your video :)

gillesmosson
Автор

(subscribed, liked) :D Thankyou so much !

shahzebaslam
Автор

This video cleared the passing of functions, i want to go through all react episodes but in playlist i could not find, can you let me know how to find all the react videos

dharmarao
Автор

I was wondering if anyone knew how to do this, but instead it's between two child components. Basically I have
return (
<div>
<Navbar />
<WebSocketStuff />
<Router>
<Switch>
<Route path="/account/login" component={Login}></Route>
</Switch>
</Router>
</div>
);
and want to pass a reference so I can receive information and send information between my Login component and WebSocket Component.

MrPicklepod
Автор

I get an error .
"this.props.function_name is not a function"
how to fix it?

siddharthmagadum