How To Send Data From Child To Parent Component In ReactJS | Lifting The State Up In React |
Vložit
- čas přidán 14. 01. 2022
- React Playlist For 2023:
• React JS 2023
Hey Everyone,
In this video I will show you that How to send data from Child to Parent Component in React, which is a concept of Lifting The State Up in React which is We have to handle state in Parent Component
Please like the video and please subscribe for more tutorials.
How much JavaScript is Required Before Learning ReactJS?
• Video
MERN Stack 2023 Tutorial & Project:
• Video
#reactjs
#reactcomponents
#reactstate
Copyright Disclaimer under section 107 of the Copyright Act 1976, allowance is made for “fair use” for purposes such as criticism, comment, news reporting, teaching, scholarship, education and research. Fair use is a use permitted by copyright statute that might otherwise be infringing.
Fast and efficient explanation. Thanks a ton - made this concept very easy for me to understand.
your tutorial is so good that you actually explained another question i had before i couldnt find googling, awesome
This was the best explanation of this concept that I have found on the Internet after 3 hours of Googling. Thank you!
Awesome! Thanks for the tutorial!
thank you so much! very helpful, I needed this 👍
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...
Simple, short and Clear ->> I liked
wow! exactly what i was looking, i found it! Many thanks!
You're a life saver, thank you!
A short & simple explanation, thank you :)
Awesome tutorial! every min is informative. Thank you very much. “Keep Up The Good Work”!!
Glad you liked it.
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!
You are the best, thanks so much bro!
thank you . this video tutorial helped me a lot
Awesome, thank u mate.
Absolutely very simple trick, Thank you so much 😊
Thanks for explaining in a clear and concise manner.
nice one it worked, I was able to achieve the desired result.
Nice!!!
Thanks, bro. God bless you!
Forte abraço do Brasil!
Thank you a lot!
that' was
really helpful
Thank you Sir nice video. Helped me a Lot🙏
Much appreciated
than you brother you save me from a big problem thanks a big respect for you from morocco
Awesome easy explanation to the point
Thankyou! Your tutorial solved a problem.......
very help full video❤ , and how can we store that value in a constant variable?
Thanks sir 💖
Thank You Sir❤
very good explanation thank you
tank u my dear frend!!!!
thank youuuuuuuuuuuu
Thank you for this, reeeeallly weell done
Glad you enjoyed it!
Большое спасибо индусам с ютуба!!! Я 5 часов боролся с этой проблемой, в итоге нужно было просто пропсы одним элементом прописывать!!!!
Nice tutorial
why are you using state variables again in the child component? can't you use the props directly from the parent
Thanks papi!
Any time!
thanks
Nice explanation
Easy to understand with your video
Thank you for the support 🙂
Thanks a lot for the video! Very precise and to-the-point!
Glad you enjoyed it!
eggsaggly what i needed :)
Good Explanation Nikhil!
Thanks 🙏
Much fast video, but much clear concept. Aabhaaar🙏🙏
This is called as callback function ?
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?)
use the state in parent one, and pass both state and setState to child. done😀
@IndianCoders Thanks! If possible, could you please explain it with an example?
I would be very grateful to you.
Very clear but please explain in more details because we some are beginners
You are techinfoyt 😮
Means?
i bought ur mui styled course from udemy
super and sample
simple but effective best answer to give in interviews..tq
Can you tell me how to print the that getdata not on the console but on the screen like in paragraph
It's super simple, Store data from getdata in state variable. Update the state when receiving that data. Then you can render on screen.
@@IndianCoders thanks a lot
bhai y dusro ko samghane k liye bnai thi ya khud ka revision chl rha tha.
how do you pass multiple input fileds from child to parent without using state in child?
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
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.
Parents are those components who render child components. Like the List component loops through an array and renders each ListItem (child) component inside it.
@@IndianCoders Thank you so much!
@@madelsonacosta7962 You will understand much better if the parent and child component is in a different file.
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😢
how to store the data in mysql database via nodejs
Will try to create video on that!
its good and supper but go little slow , beginner also watching ,we are expecting like this only
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
wa 3la ghm9a
Bro , here again u passed props from parent to child only ..how come it's concept called child to parent ..
Yes we added callback in child, so when child component fires something so we will get that in parent component.
"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
This was the best explanation of this concept that I have found on the Internet after 3 hours of Googling. Thank you!
Welcome 😄
Totally Agreed. I looked so many exammples and finally got it right because of this.
Same, last night same thing happened with me
I forgot everything after I listened these video
Nice explanation