Тёмный

React Refs | forwardRef TUTORIAL 

The Code Creative
Подписаться 13 тыс.
Просмотров 21 тыс.
50% 1

An explanation of Refs and forwardRef in React. React's forwardRef allows us to pass Refs from Parent components to Child components. Created by Gregg Fine.
📖 Download my FREE "Google Search Secrets for Developers" Cheat Sheet:
store.thecodecreative.com/goo...
🗣JOIN the Code Creative Facebook group! :
/ 1612600368887577
🔴Subscribe for more free Code Creative videos: : / @thecodecreative
🌐 The Code Creative Official Website
www.thecodecreative.com/
🎓 The Code Creative Courses
www.thecodecreative.com/courses
✅ Recommended related videos:
Web Audio API: Exploring Oscillators
www.youtube.com/watch?v=Sdz5N...
Web Audio API: createOscillator and Audio Nodes
www.youtube.com/watch?v=pJnhP...
Web Audio API: What is Audio Context?
www.youtube.com/watch?v=WD-T_...
✅ For business inquiries contact me at gregg@greggfinedev.com
✅ Let's connect:
Twitter - @GreggFine
Instagram - /greggfineguitar
Facebook - /hiddentigermusic

Наука

Опубликовано:

 

13 фев 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 57   
@TheCodeCreative
@TheCodeCreative 4 года назад
To subscribe to the channel: ru-vid.com/show-UCmOpHGj4JRWCdXhllVTZCVw
@hendrickmanenga9213
@hendrickmanenga9213 2 месяца назад
What a simple way to explain what seemed to be a complex topic.Thank you
@TheCodeCreative
@TheCodeCreative 2 месяца назад
Glad to hear, thanks for watching!
@MrRobeezy29
@MrRobeezy29 3 года назад
Nice. So simple and exactly what I needed. There are way too many videos on youtube that overcomplicate coding. Not this one. Subscribed.
@TheCodeCreative
@TheCodeCreative 3 года назад
Glad it helped! Thanks for subscribing!
@rayahmed2202
@rayahmed2202 2 года назад
Brief but comprehensive, thanks!
@marktomlful
@marktomlful 4 года назад
Outstanding explanation and demonstration. Thank you so much for sharing
@TheCodeCreative
@TheCodeCreative 4 года назад
Hi Mark, thanks for watching!
@NNNedlog
@NNNedlog Год назад
Thanks a lot for this simple but very precise tutorial. I've been having issues with ref forwarding
@TheCodeCreative
@TheCodeCreative Год назад
Glad it helped
@rohil3023
@rohil3023 Год назад
I keep coming back to this video once in a while because I always forget how to use forward ref
@TheCodeCreative
@TheCodeCreative Год назад
Glad to hear!
@indigosay8272
@indigosay8272 3 года назад
Thanks to you, I understood this function
@TheCodeCreative
@TheCodeCreative 3 года назад
Great! 👍🏻
@akhilscamp1905
@akhilscamp1905 8 месяцев назад
Explained very well... Bulls eye to my brain
@TheCodeCreative
@TheCodeCreative 8 месяцев назад
👍🏻🎯🎯👍🏻
@dweebycat9929
@dweebycat9929 Год назад
I laughed when the emoji appeared haha thank you for the great tutorial!
@TheCodeCreative
@TheCodeCreative Год назад
🤣 Glad you liked it!
@guitarlearner6646
@guitarlearner6646 3 года назад
Excellent..!!! Thank You :)
@TheCodeCreative
@TheCodeCreative 3 года назад
Thanks for checking it out!
@ckiv1992
@ckiv1992 Год назад
beautifully done
@TheCodeCreative
@TheCodeCreative Год назад
thank you!
@Sanyat100
@Sanyat100 2 года назад
The ending music made me happy
@TheCodeCreative
@TheCodeCreative 2 года назад
😀
@PrashanthBalakrishnan
@PrashanthBalakrishnan 6 месяцев назад
Thank you
@TheCodeCreative
@TheCodeCreative 6 месяцев назад
Welcome!
@cervece41
@cervece41 4 года назад
Thanks for the detailed explanation Gregg, do you have a quick tip to forward a ref to a sibling component?
@TheCodeCreative
@TheCodeCreative 4 года назад
Hi cervece41, I don't know of any way to do that as the idea of forewardRef is to pass the ref from parent to child. Maybe you can try structuring your components in a different way or just bring that ref into the sibling component directly. Thanks for watching!
@luxgroove480
@luxgroove480 3 года назад
how can we pass multiple refs into one component? and also can you change the name of "ref" when its passed?
@aashayamballi
@aashayamballi 3 года назад
Thanks🙏🏼
@TheCodeCreative
@TheCodeCreative 3 года назад
Thank you!
@webdev5244
@webdev5244 4 года назад
Hey,man.Thank your for you awesome video and May I know your vscode theme. It looks so fantastic
@TheCodeCreative
@TheCodeCreative 4 года назад
Hi web dev, it's called Shades of Purple. Thanks for watching!
@gilberttorchon1280
@gilberttorchon1280 8 месяцев назад
what's the vscode theme you're using? I love it it's very easy on the eyes
@TheCodeCreative
@TheCodeCreative 8 месяцев назад
Thanks! It's called "Shades of Purple"
@TusharBorawake
@TusharBorawake 4 года назад
Hi, Can you please make video in which parent component can have access it's child component and grandchild component methods. I was stuck in my real time project.
@TheCodeCreative
@TheCodeCreative 4 года назад
Hi Tushar, do you have a specific example of what you're trying to do? Generally, if you want the parent component to have access to a method in a child component, you'd move the method up into the parent component and then you could pass it down as a prop to the child component/s. That way, both parent and child components could have access to that particular method.
@saurabrakshit405
@saurabrakshit405 Год назад
Can you bother a little to make a vedio on how to send refs from child to parent , it will be appreciated a lot .
@fahim8931
@fahim8931 9 месяцев назад
Why do you need forwardRef though? Isn't it the same to just pass audioRef as a prop? I'm not entirely sure what benefit we're getting here even though I'm sure there's some kind of benefit here
@PierreLaBaguette
@PierreLaBaguette 2 года назад
how is this better than passing ref as a usual prop and consuming it as a usual prop as well?
@ogreeni
@ogreeni Год назад
I was having the same question.
@TusharBorawake
@TusharBorawake 4 года назад
Am facing issue with below scenario. I have class parent component and child as a functional component. Child component has one method ("showAlert") which I want to call in parent component button click. How do I achieve that. ? Not found any solution on Google because parent component is es6 class component and child is a functional react hooks component. Please share solution on this query. Thanks
@TheCodeCreative
@TheCodeCreative 4 года назад
I would move the showAlert method up to the parent class-based component and then pass it down as a prop to the functional child component.
@TheCodeCreative
@TheCodeCreative 3 года назад
🗣JOIN the Code Creative Facebook group! : facebook.com/groups/1612600368887577
@gligorpecev5199
@gligorpecev5199 4 года назад
What is the name of the theme you are using in your editor?
@TheCodeCreative
@TheCodeCreative 4 года назад
This one is called "Shades of Purple". I've been sticking with this one for about a year. I really like it.
@gligorpecev5199
@gligorpecev5199 4 года назад
@@TheCodeCreative looks cool, i'll try it
@TheCodeCreative
@TheCodeCreative 4 года назад
@@gligorpecev5199 👍🏻
@webdev5244
@webdev5244 4 года назад
@@TheCodeCreative haha, it is here.thanks
@TheCodeCreative
@TheCodeCreative 2 года назад
📖 Download my FREE "Google Search Secrets for Developers" Cheat Sheet: store.thecodecreative.com/google-secrets-cheat-sheet
@Fatima-ie5kj
@Fatima-ie5kj 2 года назад
WHY U STOP MAKING VIDEOS ?
@TheCodeCreative
@TheCodeCreative 2 года назад
Many new videos up now!
@revisionnaire
@revisionnaire Год назад
you sound like robert downey jr. thanks for the vid tho
@TheCodeCreative
@TheCodeCreative Год назад
Love Robert!
@JonathanLaliberte1
@JonathanLaliberte1 Год назад
spelling mistake in video title. 'forwardRef'
@TheCodeCreative
@TheCodeCreative Год назад
thanks, corrected!
Далее
React Hooks Tutorial | The useRef Hook
10:22
Просмотров 5 тыс.
Learn React Hooks: useRef - Simply Explained!
12:42
Просмотров 81 тыс.
POV: Spain vs Italia
00:11
Просмотров 350 тыс.
Goodbye, forwardRef
15:59
Просмотров 5 тыс.
React 23: forwardRef
9:50
Просмотров 9 тыс.
I Cannot Believe React Made A Hook For This
8:45
Просмотров 100 тыс.
Never Forget React forwardRef Again
9:33
Просмотров 14 тыс.
React Hook useRef and forwarding refs with forwardRef
14:46
I'm Never Using React Router Again
13:12
Просмотров 53 тыс.
Most Beginner React Developers Do This Wrong
13:47
Просмотров 225 тыс.
Learn useRef in 11 Minutes
10:20
Просмотров 621 тыс.