React useRef and forwardRef in depth

  Рет қаралды 24,254

Fullstack Simplified

Fullstack Simplified

Күн бұрын

In this video you will learn how to use React useRef hook and forwardRef in order to reference any element present in the DOM tree in a completely optimised and recommend way.
☕️ Support me - www.buymeacoffee.com/gprasoon
📚 Materials/References:
- Github link - github.com/FullstackSimplifie...
- Create react app: reactjs.org/docs/create-a-new...
- React useRef docs: reactjs.org/docs/hooks-refere...
- React forwardRef docs: reactjs.org/docs/forwarding-r...
🧠 Concepts Covered:
- React Refs
- React Hooks
- React useRef
- React forwardRef
🌎 Find Me Here:
My Website: prasoon.me
LinkedIn: / prosoon-goswami
Twitter: / prasoongoswami4
GitHub: github.com/FullstackSimplified
Instagram: / prasoon_goswami

Пікірлер: 71
@Mayomoz11
@Mayomoz11 2 жыл бұрын
Thank you! The docs made it a little confusing, your explanation was perfect :)
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
Thanks for watching
@demomicrocrawlerclub
@demomicrocrawlerclub Жыл бұрын
Very informative and straightforward. Great examples also. Thanks a lot.
@FullstackSimplified
@FullstackSimplified Жыл бұрын
Glad it was helpful!
@Fulakitele
@Fulakitele 2 жыл бұрын
Excellent explanation brother. Thank you very much!
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
Thanks for watching 🔥🔥
@ThomasKupracz
@ThomasKupracz Жыл бұрын
Just wanted to say a BIG THANK YOU for this video. I could have saved myself 20 hours of frustration and swearing if I had just watched it before starting to play with Refs. You rock!
@FullstackSimplified
@FullstackSimplified Жыл бұрын
Glad it helped. Thanks for watching man🔥🔥
@ifeolulesi
@ifeolulesi Жыл бұрын
A very useful video. I was able to understand useRef and forwardRef clearly.
@FullstackSimplified
@FullstackSimplified Жыл бұрын
Glad it helped
@tanayahuja87
@tanayahuja87 Жыл бұрын
Amazing tutorial in just one go i have understood it. Awesome sir ji! Excellent and also short & sweet video!
@FullstackSimplified
@FullstackSimplified Жыл бұрын
Thanks and welcome
@phaZZi6461
@phaZZi6461 10 ай бұрын
very clean presentation and explanation. thank you very much
@FullstackSimplified
@FullstackSimplified 8 ай бұрын
Glad it was helpful!
@shivakrishnakudurupaka3601
@shivakrishnakudurupaka3601 2 жыл бұрын
Feeling happy that I know when to use forwardRef hook now😀
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
Glad it helped. Thanks for watching
@gabrielkripalani1681
@gabrielkripalani1681 Жыл бұрын
great job on that explanation!
@FullstackSimplified
@FullstackSimplified Жыл бұрын
Glad it was helpful!
@Durgaprasad-be1jc
@Durgaprasad-be1jc Жыл бұрын
Nice explanation brother. Thank you
@FullstackSimplified
@FullstackSimplified Жыл бұрын
Glad you liked it
@sayyedaamerasharali7583
@sayyedaamerasharali7583 2 жыл бұрын
Very helpful video 👍😁
@anshurao4727
@anshurao4727 Жыл бұрын
very helpful sir thank you!!
@FullstackSimplified
@FullstackSimplified Жыл бұрын
Glad you like it. Thanks
@ninadkhanolkar3256
@ninadkhanolkar3256 Жыл бұрын
Finally understood Forward Ref :-)
@FullstackSimplified
@FullstackSimplified Жыл бұрын
Really glad it helped. Thanks for watching
@Nilesh.Pandey
@Nilesh.Pandey 2 жыл бұрын
Great work bro 👍🏽
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
Thanks alot 👍
@shaurgaleeb6285
@shaurgaleeb6285 Жыл бұрын
clear and perfect
@CliffordFajardo
@CliffordFajardo 2 жыл бұрын
At 3:01 - "useEffect" goes into an infinite loop since you're not passing an item to the dependency array so I think you're not using the hook in the way it was intended: - change state -> component re-renders -> hook re-runs again -> component re-renders; in fact that infinite loop happening is not a bug but actually suppose to happen, I don't think this example was particularly good as it might confuse beginners into thinking their is inherent downside to useEffect in this situation which is not the case I did learn a bit more about "useRef" thanks!
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
I think you didn’t get what actually was meant. If you want to count how many times the component re renders you can't pass any dependency array to the useffect. If you pass an empty array then that effect will run only once for the first time when the component mounts and then we wont be able to count the number of re renders. So for this particular case useState do have a downside and that is why we use refs for these cases which survives between render cycles. So if you watch the video again you will se it is one of the easiest example for beginners to understand the use of refs in these conditions. Thanks for watching!!
@HarshSingh-hk8fe
@HarshSingh-hk8fe 2 жыл бұрын
nicely explained too good :D
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
Thanks a lot 😊
@zainmalik2812.
@zainmalik2812. Жыл бұрын
Only react users knows how helpful this video is
@FullstackSimplified
@FullstackSimplified Жыл бұрын
Really glad you liked it. Thanks for watching
@kritigoswami7382
@kritigoswami7382 2 жыл бұрын
Indeed helpful 🙂
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
Thank you
@Pareshbpatel
@Pareshbpatel 7 ай бұрын
A very clear explaination of useRef and forwardRef. Thanks. {2023-11-09}, {2024-03-22}
@FullstackSimplified
@FullstackSimplified 5 ай бұрын
Glad you liked it. Thanks for watching
@rahulkrishna164
@rahulkrishna164 2 жыл бұрын
Great video
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
Thank you
@sujitrockstar221
@sujitrockstar221 2 жыл бұрын
Nice Video
@georgylistopad3976
@georgylistopad3976 Ай бұрын
Thank you soooooooooooo MUCH!!❤
@FullstackSimplified
@FullstackSimplified 21 күн бұрын
You’re welcome! Glad you liked it
@ramesh90010
@ramesh90010 2 жыл бұрын
Good job 👌
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
Thank you 😀
@mohammadqanadilo7512
@mohammadqanadilo7512 2 жыл бұрын
Thanks :)
@ashishkumarsingh9857
@ashishkumarsingh9857 2 жыл бұрын
Bhaiya... Meri samajh mei aa gya bhaiya.
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
😂😂👍
@armenstepanyan2954
@armenstepanyan2954 2 жыл бұрын
great video
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
Thanks for watching 🔥🔥
@kevin73911
@kevin73911 2 жыл бұрын
Thank you. ;)
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
Thanks for watching
@alvingomez7079
@alvingomez7079 Жыл бұрын
10/10 STARS !!!!
@FullstackSimplified
@FullstackSimplified Жыл бұрын
Glad you liked it
@fromsoundtosea2010
@fromsoundtosea2010 Жыл бұрын
nice!
@FullstackSimplified
@FullstackSimplified Жыл бұрын
Glad you liked it. Thanks for watching
@romantyniv5381
@romantyniv5381 2 жыл бұрын
thanks
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
You're welcome!
@thecareercoach231
@thecareercoach231 2 жыл бұрын
Good.
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
Thank you
@deepaksaroha522
@deepaksaroha522 Ай бұрын
usecase 2 and 2 not same?
@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 .
@FullstackSimplified
@FullstackSimplified Жыл бұрын
Hey thanks for watching. For passing ref from child to parent you can use callback
@chhavimanichoubey9437
@chhavimanichoubey9437 Ай бұрын
web dev simplified - indian version?
@FullstackSimplified
@FullstackSimplified 21 күн бұрын
Glad you consider the same. Trying to make things easier to understand.
@chennasreenu4723
@chennasreenu4723 5 ай бұрын
Thank You, Keep doing Indian
@FullstackSimplified
@FullstackSimplified 5 ай бұрын
Thanks for watching. Do checkout my latest video on the channel as well on react dark mode - kzbin.info/www/bejne/jKjZiZ2QftRqr9Usi=w3jhLV6RUt4WkCst
@willyhorizont8672
@willyhorizont8672 2 жыл бұрын
thanks
@FullstackSimplified
@FullstackSimplified 2 жыл бұрын
You're welcome!
React Hook useRef and forwarding refs with forwardRef
14:46
techsith
Рет қаралды 80 М.
useRef and forwardRef in React | Learn useRef hook and forwardRef
19:18
Rajesh Bhattarai
Рет қаралды 1,4 М.
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 693 М.
Cute Barbie Gadget 🥰 #gadgets
01:00
FLIP FLOP Hacks
Рет қаралды 37 МЛН
Never Forget React forwardRef Again
9:33
Coding in Public
Рет қаралды 12 М.
Mastering React Context: Do you NEED a state manager?
37:26
Jack Herrington
Рет қаралды 96 М.
Goodbye, forwardRef
15:59
UI Engineering
Рет қаралды 4,6 М.
Custom Hooks in React (Design Patterns)
12:56
Cosden Solutions
Рет қаралды 32 М.
React 23: forwardRef
9:50
Школа web-программирования Constcode
Рет қаралды 9 М.
10 React Antipatterns to Avoid - Code This, Not That!
8:55
Fireship
Рет қаралды 712 М.
ALL React Hooks Explained in 12 Minutes
12:21
Code Bootcamp
Рет қаралды 69 М.
Learn React Hooks: useImperativeHandle - Simply Explained!
9:54
Cosden Solutions
Рет қаралды 16 М.
useRef hook in reactjs | Easiest way
19:44
Hitesh Choudhary
Рет қаралды 71 М.
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 693 М.