How To Send Data From Child To Parent Component In ReactJS | Lifting The State Up In React |

  Рет қаралды 113,560

Indian Coders

Indian Coders

Күн бұрын

Пікірлер: 87
@ahmeterdonmez9195
@ahmeterdonmez9195 Жыл бұрын
Thanks for your effort dude. But this kind of infos may be misunderstanding for beginners and interview questuon failures! Here is nothing goes from child to parent. You still pass your getData() function from Parent To Child. If your goal is really get data from child, no need extra getData() function and more line codes (DRY Principle). You can create your [name, setName] state in parent and pass them as props to the child and render them in child. Then you will get your info from child. Thanks...
@k4f
@k4f 2 жыл бұрын
This was the best explanation of this concept that I have found on the Internet after 3 hours of Googling. Thank you!
@IndianCoders
@IndianCoders 2 жыл бұрын
Welcome 😄
@yuvrajgaonkhowa5520
@yuvrajgaonkhowa5520 2 жыл бұрын
Totally Agreed. I looked so many exammples and finally got it right because of this.
@bhaskar99
@bhaskar99 Жыл бұрын
Same, last night same thing happened with me
@rajureddy5865
@rajureddy5865 5 ай бұрын
I forgot everything after I listened these video
@2an_sound
@2an_sound 2 жыл бұрын
While your speed is inspiring, you also somehow explain this SO well, at least for me at my current level. This is a very good tutorial Nikhil!
@khatariinsaan5284
@khatariinsaan5284 2 жыл бұрын
Simple, short and Clear ->> I liked
@McProski
@McProski 2 жыл бұрын
Fast and efficient explanation. Thanks a ton - made this concept very easy for me to understand.
@robertoriosmorales7528
@robertoriosmorales7528 2 жыл бұрын
your tutorial is so good that you actually explained another question i had before i couldnt find googling, awesome
@KislayRaj
@KislayRaj 2 жыл бұрын
Awesome! Thanks for the tutorial!
@dipikamishra1107
@dipikamishra1107 2 жыл бұрын
Awesome tutorial! every min is informative. Thank you very much. “Keep Up The Good Work”!!
@IndianCoders
@IndianCoders 2 жыл бұрын
Glad you liked it.
@Photoficaj
@Photoficaj Жыл бұрын
wow! exactly what i was looking, i found it! Many thanks!
@DavidAdochiti
@DavidAdochiti Жыл бұрын
thank you so much! very helpful, I needed this 👍
@shiro298
@shiro298 Жыл бұрын
You're a life saver, thank you!
@harshaltamrakar9721
@harshaltamrakar9721 8 ай бұрын
Thankyou! Your tutorial solved a problem.......
@makuzinus
@makuzinus Жыл бұрын
Большое спасибо индусам с ютуба!!! Я 5 часов боролся с этой проблемой, в итоге нужно было просто пропсы одним элементом прописывать!!!!
@vinothm8631
@vinothm8631 2 жыл бұрын
why are you using state variables again in the child component? can't you use the props directly from the parent
@hichamaitjak4631
@hichamaitjak4631 Жыл бұрын
than you brother you save me from a big problem thanks a big respect for you from morocco
@rudikshul25
@rudikshul25 4 ай бұрын
Thanks for guide!
@ShubhamGupta-zz8wx
@ShubhamGupta-zz8wx 2 жыл бұрын
Easy to understand with your video
@IndianCoders
@IndianCoders 2 жыл бұрын
Thank you for the support 🙂
@carlospen8413
@carlospen8413 8 ай бұрын
Awesome easy explanation to the point
@isagive
@isagive 2 жыл бұрын
Awesome, thank u mate.
@thunderbolthminfas
@thunderbolthminfas 2 жыл бұрын
Absolutely very simple trick, Thank you so much 😊
@hi-yi7en
@hi-yi7en 2 жыл бұрын
simple but effective best answer to give in interviews..tq
@Oxhshdh
@Oxhshdh 9 ай бұрын
Thank you Sir nice video. Helped me a Lot🙏
@ogs102
@ogs102 8 ай бұрын
that' was really helpful
@alipourhassan3263
@alipourhassan3263 2 жыл бұрын
thank you . this video tutorial helped me a lot
@matinashrestha7325
@matinashrestha7325 2 жыл бұрын
Thanks for explaining in a clear and concise manner.
@AkaiCindy
@AkaiCindy Жыл бұрын
Thank you a lot!
@hrishabhkumar1954
@hrishabhkumar1954 2 жыл бұрын
nice one it worked, I was able to achieve the desired result.
@parthumrania6094
@parthumrania6094 2 жыл бұрын
A short & simple explanation, thank you :)
@hirankr
@hirankr Жыл бұрын
Much appreciated
@adolfomolina9919
@adolfomolina9919 2 жыл бұрын
You are the best, thanks so much bro!
@viniciusm.m.7822
@viniciusm.m.7822 2 жыл бұрын
Nice!!! Thanks, bro. God bless you! Forte abraço do Brasil!
@codeblackfantasy8927
@codeblackfantasy8927 Жыл бұрын
Thank you for this, reeeeallly weell done
@IndianCoders
@IndianCoders Жыл бұрын
Glad you enjoyed it!
@gandamraviteja7019
@gandamraviteja7019 6 ай бұрын
very good explanation thank you
@thewandererog
@thewandererog 9 ай бұрын
Thanks sir 💖
@hrishikeshthite6674
@hrishikeshthite6674 2 жыл бұрын
Can you tell me how to print the that getdata not on the console but on the screen like in paragraph
@IndianCoders
@IndianCoders 2 жыл бұрын
It's super simple, Store data from getdata in state variable. Update the state when receiving that data. Then you can render on screen.
@nickolas240
@nickolas240 Жыл бұрын
@@IndianCoders thanks a lot
@devadharsank7160
@devadharsank7160 Жыл бұрын
This is called as callback function ?
@techcube97
@techcube97 2 жыл бұрын
Thank You Sir❤
@kevinleon4621
@kevinleon4621 Жыл бұрын
Thanks papi!
@IndianCoders
@IndianCoders Жыл бұрын
Any time!
@karthikeyanj4952
@karthikeyanj4952 2 жыл бұрын
Good Explanation Nikhil!
@IndianCoders
@IndianCoders 2 жыл бұрын
Thanks 🙏
@rutvijbagde633
@rutvijbagde633 Жыл бұрын
You are techinfoyt 😮
@IndianCoders
@IndianCoders Жыл бұрын
Means?
@snehalgawade-n9u
@snehalgawade-n9u Жыл бұрын
Hello, Thanks for covering this topic. Could you please explain after state lifting how to use that data in the parent component which we have received from child component? (Now we can print that data in the console but how to access that data outside the function in the Parent Component?)
@IndianCoders
@IndianCoders Жыл бұрын
use the state in parent one, and pass both state and setState to child. done😀
@snehalgawade-n9u
@snehalgawade-n9u Жыл бұрын
@IndianCoders Thanks! If possible, could you please explain it with an example? I would be very grateful to you.
@hiranyasarma8886
@hiranyasarma8886 2 жыл бұрын
Nice tutorial
@aninexclusive466
@aninexclusive466 2 жыл бұрын
Nice explanation
@idk-dr7fo
@idk-dr7fo Жыл бұрын
thank youuuuuuuuuuuu
@agustingiannoni6910
@agustingiannoni6910 2 жыл бұрын
tank u my dear frend!!!!
@souvikkumarpaul4282
@souvikkumarpaul4282 2 жыл бұрын
how to store the data in mysql database via nodejs
@IndianCoders
@IndianCoders 2 жыл бұрын
Will try to create video on that!
@HarpreetSingh-br2ix
@HarpreetSingh-br2ix 2 жыл бұрын
how do you pass multiple input fileds from child to parent without using state in child?
@santiagodelrivero
@santiagodelrivero 2 жыл бұрын
You could use state in the parent and then pass the entire state as props to the child. Doing so, you could set the state in the child and it will automatically change the state in the parent
@Spluli
@Spluli 2 жыл бұрын
eggsaggly what i needed :)
@thohidbaig405
@thohidbaig405 Жыл бұрын
very help full video❤ , and how can we store that value in a constant variable?
@annayeung789
@annayeung789 Жыл бұрын
Thanks a lot for the video! Very precise and to-the-point!
@IndianCoders
@IndianCoders Жыл бұрын
Glad you enjoyed it!
@khoanguyentuan417
@khoanguyentuan417 Жыл бұрын
thanks
@MANISHKUMAR-ib3zq
@MANISHKUMAR-ib3zq 2 жыл бұрын
Much fast video, but much clear concept. Aabhaaar🙏🙏
@AdilKhan-gj4jy
@AdilKhan-gj4jy 2 жыл бұрын
Very clear but please explain in more details because we some are beginners
@ankurgangwar4923
@ankurgangwar4923 Жыл бұрын
bhai y dusro ko samghane k liye bnai thi ya khud ka revision chl rha tha.
@atifreza4607
@atifreza4607 Жыл бұрын
i bought ur mui styled course from udemy
@lmanqhrmanova8006
@lmanqhrmanova8006 7 ай бұрын
But I have 3 differences between my parent and child elements, in this case personally, this way shouldn't work, how i can achieve this, I already have used a lot of ways but I can't already I feel extausted😢
@madelsonacosta7962
@madelsonacosta7962 2 жыл бұрын
Thank you for this clear explanation, I appreciate it. Would you mind explaining what's a parent and a child in react, please? I don't seem to grasp it.
@IndianCoders
@IndianCoders 2 жыл бұрын
Parents are those components who render child components. Like the List component loops through an array and renders each ListItem (child) component inside it.
@madelsonacosta7962
@madelsonacosta7962 2 жыл бұрын
@@IndianCoders Thank you so much!
@haider_javaid
@haider_javaid 2 жыл бұрын
@@madelsonacosta7962 You will understand much better if the parent and child component is in a different file.
@sampathb2920
@sampathb2920 2 жыл бұрын
its good and supper but go little slow , beginner also watching ,we are expecting like this only
@ashutoshjha5522
@ashutoshjha5522 Жыл бұрын
Is it lifting state up ? Passing data from child to parent?we can do it with use imperative handle too please highlight if anyone can m confused Moreover here prop is passing from parents to child
@kunalsingh9461
@kunalsingh9461 2 жыл бұрын
super and sample
@CatchyVideo
@CatchyVideo Жыл бұрын
Bro , here again u passed props from parent to child only ..how come it's concept called child to parent ..
@IndianCoders
@IndianCoders Жыл бұрын
Yes we added callback in child, so when child component fires something so we will get that in parent component.
@ahmed_lazrak
@ahmed_lazrak Жыл бұрын
wa 3la ghm9a
@gabrielgavrilov520
@gabrielgavrilov520 5 ай бұрын
"How To Send Data From Child To Parent Component" >proceeds to show how to map a function from a parent to a child thanks for wasting my time
@tejassethi9319
@tejassethi9319 2 жыл бұрын
This was the best explanation of this concept that I have found on the Internet after 3 hours of Googling. Thank you!
@venkatchalam6385
@venkatchalam6385 2 жыл бұрын
Nice explanation
Learn how to use Props in React in 19 minutes (for beginners)
19:12
Sonny Sangha
Рет қаралды 151 М.
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
ReactJS: 3 Ways Components Passes Data (Complete Tutorial w/ Demo)
8:48
A Software Engineer
Рет қаралды 38 М.
Fetching Data Doesn't Get Better Than This
6:58
Josh tried coding
Рет қаралды 139 М.
I tried 8 different Postgres ORMs
9:46
Beyond Fireship
Рет қаралды 441 М.
Props from Child to Parent Component (Hack)
8:09
Code with Ania Kubów
Рет қаралды 122 М.
Learn useState In 15 Minutes - React Hooks Explained
15:45
Web Dev Simplified
Рет қаралды 1,2 МЛН
This is the Only Right Way to Write React clean-code - SOLID
18:23
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 493 М.
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН