Sharing State data between Function Components in React

preview_player
Показать описание
In this video we will learn
1. What is a Parent Component, What is a Child Component
2. How to Share State data between two function Components
3. How to use Callback Properties in React
4. How to update Parent Components state data from Child Component
5. How to use useState for Component Communication in React

Healthy diet is very important for both body and mind. We want to inspire you to cook and eat healthy. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking.

Text Version of this Video can be found at

React Playlist:

For online or classroom training please contact us
Mobile: +91 99001 13931

Please join me to gift education to those who cannot afford.
Рекомендации по теме
Комментарии
Автор

Thanks for the videos. I am currently working on reactjs, your videos help alot

amnesia
Автор

Thanks Sreekanth for making wonderful tutorial series. Keep up the good work.

manishmawat
Автор

when I made the change in the employee component textbox it gets reflected in salary component but when I try to modify the salary component value the textbox itself become read only, don't know how it is working for you

rajug
Автор

Great Explanation!!! My doubt is here when salary is changed in child component i.e Salary Component it gets reflected in parent component because we are indirectly calling changeEmployeeInfo using onSalaryChange but when salary is changed in parent comp how it is reflected in child component?? Thanks in advance

ravivarma
Автор

Thank you very much! I didn't think about passing the function as a prop. But now I'm repeating myself a lot passing every prop, like this:
<FilterFields persons={persons}
newSearch={newSearch}

setNewSearch={setNewSearch}
newMatch={newMatch}
setNewMatch={setNewMatch}
/>

Is there another way to pass everything?

GuilhermePalazzoRodrigues
Автор

You'r videos are really good and so complete. Thanks for that, helped me a lot.
But at first it's really difficult tu understand the English you are talking :D

bitashamsafar
Автор

Thanks you my friend. Very useful for me. Can we have access to this repo?

tayfun
Автор

only works if they are apart of the same file, oftentimes they are not

ikontact
Автор

Hi Dude, please tell me how it works if I have two components in another files, like I have <One/> and <Two/>, and I need to get state from component One in components Two ?!

olegmarchenko
Автор

Any Suggestions? I'm able to pass on salary details from parent to child but not the other way...

I couldn't edit the "Enter Salary" text box as it already has the value of "salary" passed to it from the parent component which could not be modified.

shivaaps
Автор

Can anyone help share state at 2 different file ?

thanhnguyvan
Автор

useful video, but when u realize he has white theme.. it's painful

magiterU
Автор

Not a great video tbf, you can't set an explanation video with the start point being pre-existing code

arken-gaming