No video

Sharing State data between Function Components in React

  Рет қаралды 75,691

kudvenkat

kudvenkat

Күн бұрын

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.
/ @aarvikitchen5572
Text Version of this Video can be found at
www.pragimtech...
React Playlist:
• React JS tutorial for ...
For online or classroom training please contact us
Mobile: +91 99001 13931
Email: pragim@pragimtech.com or srikanth@pragimtech.com
Please join me to gift education to those who cannot afford.
/ kudvenkat

Пікірлер: 26
@amnesia3490
@amnesia3490 4 жыл бұрын
Thanks for the videos. I am currently working on reactjs, your videos help alot
@manishmawat
@manishmawat 4 жыл бұрын
Thanks Sreekanth for making wonderful tutorial series. Keep up the good work.
@deathdefier45
@deathdefier45 2 жыл бұрын
You're a hero man thanks so much
@manfyegoh
@manfyegoh 4 жыл бұрын
is it like passing props only?
@rajug1835
@rajug1835 Жыл бұрын
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
@pizzasperoni
@pizzasperoni 4 жыл бұрын
Great example!
@ravivarma2876
@ravivarma2876 4 жыл бұрын
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
@yamikadesai3931
@yamikadesai3931 3 жыл бұрын
because the Salary textfield in the child component has the same values for attribute name and value as it's parent has. i.e
@GuilhermePalazzoRodrigues
@GuilhermePalazzoRodrigues 3 жыл бұрын
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: Is there another way to pass everything?
@varunnarayanan6301
@varunnarayanan6301 Жыл бұрын
I know its been 1 year but use redux 😉
@thanhnguyvan820
@thanhnguyvan820 3 жыл бұрын
Can anyone help share state at 2 different file ?
@MONARKZAVERI
@MONARKZAVERI 2 жыл бұрын
got the answer??
@thanhnguyvan820
@thanhnguyvan820 2 жыл бұрын
@@MONARKZAVERI yes I solved it bro. Use props
@MONARKZAVERI
@MONARKZAVERI 2 жыл бұрын
@@thanhnguyvan820 2diff files and pros?? how..prop works only when compo1 has compo2 in it or viceversa....🤔
@bitashamsafar5642
@bitashamsafar5642 3 жыл бұрын
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
@BaBa-pf3ol
@BaBa-pf3ol 2 жыл бұрын
Speaking*
@tayfun5452
@tayfun5452 4 жыл бұрын
Thanks you my friend. Very useful for me. Can we have access to this repo?
@olegmarchenko9358
@olegmarchenko9358 4 жыл бұрын
Hi Dude, please tell me how it works if I have two components in another files, like I have and , and I need to get state from component One in components Two ?!
@sanjays5219
@sanjays5219 3 жыл бұрын
pass the state value as props to the two component
@MONARKZAVERI
@MONARKZAVERI 2 жыл бұрын
@@sanjays5219 but what if both the compos are on diff pages???
@shivaa3ps177
@shivaa3ps177 4 жыл бұрын
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.
@yamikadesai3931
@yamikadesai3931 3 жыл бұрын
check the name of input type in child component. it should be "salary" too.
@ikontact
@ikontact 2 жыл бұрын
only works if they are apart of the same file, oftentimes they are not
@magi5terU
@magi5terU Жыл бұрын
useful video, but when u realize he has white theme.. it's painful
@arken-gaming5585
@arken-gaming5585 3 жыл бұрын
Not a great video tbf, you can't set an explanation video with the start point being pre-existing code
useEffect Hook in React
8:49
kudvenkat
Рет қаралды 8 М.
ReactJS: 3 Ways Components Passes Data (Complete Tutorial w/ Demo)
8:48
A Software Engineer
Рет қаралды 36 М.
Секрет фокусника! #shorts
00:15
Роман Magic
Рет қаралды 46 МЛН
КАКУЮ ДВЕРЬ ВЫБРАТЬ? 😂 #Shorts
00:45
НУБАСТЕР
Рет қаралды 3,5 МЛН
Schoolboy Runaway в реальной жизни🤣@onLI_gAmeS
00:31
МишАня
Рет қаралды 4,1 МЛН
Just Give me my Money!
00:18
GL Show Russian
Рет қаралды 651 М.
Why I avoid useEffect For API Calls and use React Query instead
17:45
State Managers Are Making Your Code Worse In React
13:33
Web Dev Simplified
Рет қаралды 178 М.
Learn React useReducer Hook with Examples
14:19
Lama Dev
Рет қаралды 174 М.
React component communication using context
8:24
kudvenkat
Рет қаралды 24 М.
What is JSON ?
11:56
Telusko
Рет қаралды 1,1 МЛН
PROPS in React explained 📧
12:09
Bro Code
Рет қаралды 77 М.
How to share state between React Routes by Lifting State
8:20
Web Dev Cody
Рет қаралды 13 М.
Секрет фокусника! #shorts
00:15
Роман Magic
Рет қаралды 46 МЛН