useReducer is BETTER than useState | React Hook useReducer Tutorial

  Рет қаралды 62,789

Dave Gray

Dave Gray

Күн бұрын

Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGrayWebDevRoadmap
If you are building React apps with multiple state values to keep track of, your React apps need the useReducer hook! In this useReducer React Hook tutorial, you will learn how to apply useReducer to manage the state of your apps.
🚩 Subscribe ➜ bit.ly/3nGHmNn
🚀 React JS for Beginners full course - 9 hours: • React JS Full Course f...
🔗 Source Code: github.com/gitdagray/usereduc...
useReducer is BETTER than useState | React Hook useReducer Tutorial
(00:00) Intro
(00:12) Welcome and Overview
(01:05) useReducer vs useState
(01:53) Initializing useReducer
(03:33) Creating the reducer function
(05:42) Using dispatch and updating JSX
(07:12) Moving all state and handling an action payload
(08:25) An easy mistake to make
(10:01) Displaying state values in JSX
(12:44) Recommended: Action object lookup and dot notation
🔗 ES7 React JS Snippets Extension for VS Code:
marketplace.visualstudio.com/...
🔗 React Dev Tools Extension for Chrome:
chrome.google.com/webstore/de...
📚 References:
ReactJS Official site: reactjs.org/
React Wikipedia: en.wikipedia.org/wiki/React_(...)
React Jobs: www.ziprecruiter.com/candidat...
✅ Follow Me:
Twitter: / yesdavidgray
LinkedIn: / davidagray
Blog: yesdavidgray.com
Reddit: / daveoneleven
Was this tutorial about the React hook useReducer helpful? If so, please share. Let me know your thoughts in the comments.
#usereducer #react #hooks

Пікірлер: 286
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
The useReducer React hook seems more complicated at first, but after you learn how to use it, useReducer really simplifies state management compared to tracking many different pieces of state that are all implemented with the useState hook. Once you learn about the useReducer hook, I think you will agree! Just getting started with React? If so, I recommend starting with my 9 hour full course React tutorial here: kzbin.info/www/bejne/iIepcqx8jLRnndE
@Tajdev
@Tajdev Жыл бұрын
You have not demonstrated how to pass it to component. Please also make video of it.
@m1dway
@m1dway Жыл бұрын
@@Tajdev just pass it in an input parameter. Ex:
@minimumt3n204
@minimumt3n204 Жыл бұрын
Showing how its similar to useState and rewriting it using useReducer makes it so much more clear! Thank you!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome!
@jingli9232
@jingli9232 Жыл бұрын
the best tutorial for useReducer, super clear and simple to understand, what a teacher!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad it was helpful!
@Andi-rd8yf
@Andi-rd8yf 11 ай бұрын
Exactly what i was looking for, really appreciate your work buddy!
@andrews13
@andrews13 Жыл бұрын
Tried many tutorials for learning useReducer, but got confused more only. Finally I found this video which is the perfect one!! Simple, great & straight forward!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad I could help!
@try-b2k
@try-b2k 10 ай бұрын
I was having problems in learning reducer from a week or so and this video changed evrything, thanx a bunch
@El_kammex
@El_kammex 10 ай бұрын
Now I Understand more what we need useReducer hook. Great job.
@purushottamkute7485
@purushottamkute7485 9 ай бұрын
I'm literally in tears I watched so many tutorials of useReducer but this one is hands down the best one
@vincejones3381
@vincejones3381 9 ай бұрын
Great example and explanation! I haven’t seen the true value of useReducer until this video and I have been learning React for years.
@ilivetruth
@ilivetruth 4 ай бұрын
Thank you for the video and explanation, much easier to understand than the docs!
@ahmedk4345
@ahmedk4345 7 ай бұрын
best explanation i came across, thanx Dave...keep it up!
@SimPwear84
@SimPwear84 2 жыл бұрын
Nicely explained! Short, sweet and straight to the point. Thank you
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you! 💯
@pablocodeglia
@pablocodeglia Жыл бұрын
What a great and easy-to-get explanation for a pretty confusing topic. Excellent work, thanks Dave!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad it was helpful!
@syeds8314
@syeds8314 10 ай бұрын
Many Thanks for the video!❤ After watching and studying several resources, your video made things clear to me.
@xungngo
@xungngo 10 ай бұрын
Thanks man, your explanation is superb! Keep up the good work.
@joseff5998
@joseff5998 2 жыл бұрын
Thank you so much Dave! I was really trying to understand the use Reducer. This was so clear!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Glad I could help, Josef!
@hannah51238
@hannah51238 9 ай бұрын
This is such a great explanation of useReducer! Thanks very much Dave 😍
@confusedGuenni
@confusedGuenni 6 ай бұрын
I finally got it. Well done tutorial, thank you.
@4t196
@4t196 2 жыл бұрын
This was easy easy to understand. The best useReducer tutorial so far.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Glad I could help! 💯
@BabaNoami
@BabaNoami 2 жыл бұрын
Thanks. Very clear explanation. My first real intro to useReducer. Looking forward to putting it into practice.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You're welcome, Noam 🙏💯
@maxwellosuji4096
@maxwellosuji4096 2 жыл бұрын
Thank you very much sir. I’ve been having difficulties learning the useReducer hook. I get more confused reading articles and watching other videos. But thankfully You’ve explained and broken down the what, why and usage of this particular hook. I’m so grateful it’s a thumbs up for me👍
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Glad it was helpful! 💯
@kaioqrz
@kaioqrz Жыл бұрын
Thank you Dave! After so much time trying to understand the useReducer I finally made it! Thank you man!! :D
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome! 💯
@user-ol6tq5hw7s
@user-ol6tq5hw7s 2 жыл бұрын
I watched a lot of clips about useReducer and after this it is crystal clear to me so you are great and just keep it up because these are amazing videos and thank you very much for that! Big Greetings from Serbia Dave. :)
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Great to hear from Serbia! And glad I could help 💯🙏
@zb2747
@zb2747 Жыл бұрын
Best tutorial and explanation I found - thank you Dave!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad it was helpful!
@arungrg
@arungrg Жыл бұрын
Felt so much like small scale Redux. Loved how you explained everything. Great job 👍
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you!
@neo90sr
@neo90sr 2 жыл бұрын
Very nice explanation. I had some trouble understanding this, but now it's all clear
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Great to hear! 💯🚀
@javadrip
@javadrip Жыл бұрын
Watched many useReducer tutorials and this is the best! Simple, easy to follow and no digressing halfway.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you!
@Un0Real333
@Un0Real333 2 жыл бұрын
Just brilliant! I did so much refactoring and made my code look better and more reusable, after watching your videos, keep up the good work!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
I'm glad I could help!
@stokedonthestoke
@stokedonthestoke Жыл бұрын
Thanks so much! Used this before I attempted to use useReducer in my app and then felt way more confident about what I was going to do. Your vidoes are great, really appreciate it. When I have questions about something I try to find a video from you first!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Great to hear!
@shayanfaghihi
@shayanfaghihi Жыл бұрын
Wow! You rocked it; Thanks Dave for this super and comprehensive video. I watch the very first second of the video, and I could run the app by myself. The rest was for better understanding 😉
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome, Shayan!
@JedOpeningThings
@JedOpeningThings 2 жыл бұрын
Thank you! This is prolly the cleanest and best video for the useReducer hook I can find!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Glad it was helpful! 💯🙏
@SagarKumar-db2xy
@SagarKumar-db2xy 2 жыл бұрын
Hands down the best tutorial. I am writing this comment after watching maybe 20+ videos and that too from top youtubers, but no one really simplified this much. I just have a request, please make a medium size project using useContext for global state management and useReducer to change them. Pls.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you, Sagar! I appreciate the request, too. I do need to post some projects. 🙏💯
@danielconde2729
@danielconde2729 11 ай бұрын
Excellent explanation! I was so confused using reducer
@DaveGrayTeachesCode
@DaveGrayTeachesCode 11 ай бұрын
Glad it was helpful!
@mtsurov
@mtsurov Жыл бұрын
Best explanation so far. Appreciate you making this tutorial.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad it was helpful!
@randomtalks5253
@randomtalks5253 Жыл бұрын
You are simply Love!! Such a great video. Helped me alot. Clear toThePoint conCise and compreHensive❤
@BrainAido
@BrainAido Жыл бұрын
Buddy i am probably very late, as i now just started my interest in React ( company switched to some React based CRM ) , i came to thank you X milions for putting together this video, i finally understood state and it ticked in my head as now you gave me a visual representantion in my brain, please accept my thanks i wish you the best.
@umairqamar2672
@umairqamar2672 Жыл бұрын
this is super duper amazing. Thank you Dave
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome, Umair!
@jonathanmcgee654
@jonathanmcgee654 2 ай бұрын
Amazing. I was really lost in why and how to transition from useState to useReducer. Dave walks us through it step by step! Great examples and explanations! Thank you!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 ай бұрын
Glad it was helpful!
@amancandream
@amancandream Жыл бұрын
Went through a couple videos about useReducer and was about to give up and go back to Vanilla js lol. But you explained things super well!! Thanks so much! Subbed!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad I could help!
@barreg17
@barreg17 Жыл бұрын
I finally understood it. Massive thank you!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad it helped!
@adi4057
@adi4057 Жыл бұрын
The best video to understand this concept. Thank man!!!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome!
@fabricio-garcia
@fabricio-garcia Жыл бұрын
What a great way to teach concepts! Subscribed to the channel already.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Welcome aboard!
@AndreeaCozariuc
@AndreeaCozariuc Жыл бұрын
Dave, you are a blessing. Thank you ❤‍🔥
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome!
@gogas2860
@gogas2860 2 жыл бұрын
Wow, the best explanation of usereducer hook, I've ever watched. Thank you very much!!!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You're welcome! 💯
@dranix5018
@dranix5018 Жыл бұрын
Very clear and well explained! Thanks.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad it was helpful!
@internetdrew
@internetdrew Жыл бұрын
There are a lot of great people teaching these subjects but wow you just made that simple. I just built a fullstack app and most the hold up was micromanaging pieces of state. Going to implement useReducer from here forward.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad it was helpful!
@ssj1260
@ssj1260 Жыл бұрын
It's gotten to the stage where, if i'm unsure about something I just type in "question + Dave Gray" to youtube. You have no idea how amazing it is to have a reliable source of information, when I was researching closures I came across so much conflicting information, after your video on them I vowed to make sure I looked at your videos as the main source of truth, they are clean, efficient, well explained and professional. Thanks Dave.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
That's the best compliment I could ask for! Thank you! 💯
@masruralam6199
@masruralam6199 2 жыл бұрын
How clear explanation, I ever found. Thanks Dave Gray..
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You're welcome! 💯
@ihateorangecat
@ihateorangecat Жыл бұрын
this is the video that i learnt useReducer hook and i equipped the knowledge to making a todo app all by useReducer without using useState. thanks!🙌
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Great to hear! 💯
@ashharkausar413
@ashharkausar413 Жыл бұрын
Instructive as always. Wish I had seen this video earlier it would've made my code much more optimal!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad it was helpful!
@focusroom_
@focusroom_ Жыл бұрын
This is THE BEST tutorial for useReducer, tysm!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're very welcome!
@TrueSQN
@TrueSQN Жыл бұрын
I'm from Poland, and for explaining word "dispatch" you have my subscription :D love ya lessons
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you!
@muhammedozalp
@muhammedozalp 9 ай бұрын
Thank you bro. This is a very good tutorial.
@broomybroomybroomy
@broomybroomybroomy Жыл бұрын
Man, thanks so much for explaining how to update multiple object properties in the same statement. I was pulling my hair out trying to figure out how to do what you did with the spread operator. I was changing one thing with useState and it was wiping out everything else in the object
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad it helped! 💯
@iidiez872
@iidiez872 Жыл бұрын
Best tutorial for useReducer , you made it really easy to understand.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you!
@tomnewton3191
@tomnewton3191 Жыл бұрын
Great video, very clearly explained. Thanks, Tom
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome, Tom!
@abdulazizmashrabov6399
@abdulazizmashrabov6399 Жыл бұрын
Thanks. You are hero. Awesome way of teaching. Hope you make more advanced blogs for react
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you! 🙏
@suri5023
@suri5023 Жыл бұрын
very clear explanation and easy to understand thank you sir
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome, Suri!
@jamshidtashkent1976
@jamshidtashkent1976 Жыл бұрын
Thank you Dave. It is really cool
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome!
@AvinashSingh-ts1cn
@AvinashSingh-ts1cn Жыл бұрын
Thanks a ton for sharing your knowledge. I am now a subscriber to your channel and found some other best videos. Thanks a lot man
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome! 💯
@verydifferentthought
@verydifferentthought Жыл бұрын
I was really having the problem of Redux stuff... But now I can understand where idea of Reducer came from but also dispatch, action and payload which looks like complicated stuff but after your explanation and I got the whole point of the thing. I am grateful of your amazing work from Uzbekistan !
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome and hello 👋 to Uzbekistan!
@Jawad_Siddiqui
@Jawad_Siddiqui Жыл бұрын
God gifted teacher😀Thanks
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you for the kind words, Mohammed! 🙏🙏
@clevercoderjoy
@clevercoderjoy Жыл бұрын
wow this has been so helpful I was able to implement this in my project
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad to hear that!
@sdfsdfsdffdsfsdfsd123
@sdfsdfsdffdsfsdfsd123 2 жыл бұрын
very well explained as always. THANK YOU
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You are welcome! 💯
@ahmad-murery
@ahmad-murery 2 жыл бұрын
This is much more comfortable to work with than using multiple useState hooks as I can manage all my states in one place, I thought for a while that we can pass any property when calling dispatch function then in the reducer we can check whatever properties we passed, I wasn't sure but after doing some research I found that we should use the type property and optionally the payload property when dispatching an action which makes things more organized, sometimes my silliness helps me understand things better, Thanks Dave,
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Spot on Ahmad 💯 Thanks for the note!
@mattstopa9436
@mattstopa9436 2 ай бұрын
Thanks for giving a practical example
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 ай бұрын
Glad it was helpful!
@ebesquin
@ebesquin Жыл бұрын
Thank you so much. As always a great tutorial
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome!
@farantariq3481
@farantariq3481 2 жыл бұрын
Best explanation I've found of reducers 👍
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you, Faran! 🙏💯
@RS-iy2bm
@RS-iy2bm Жыл бұрын
The best tutorial i watched that made it all easy.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad to hear that!
@MuhammadBilal-ry5rb
@MuhammadBilal-ry5rb 7 ай бұрын
Thank you so much SIr Dave I believe you are one of the best Programming instructor in the world right now all programming stuff available in your channel for beginners, intermediate and even for experts as well Thank you so much for your efforts and contribution I'm following you from last 1,2 months for ReactJS you are just amazing teacher I found on this platform Huge Love from Pakistan
@codingispower1816
@codingispower1816 6 ай бұрын
So true.
@felixlutrovnik345
@felixlutrovnik345 5 ай бұрын
must admit, i saw at least 5 videos to understand useReducer hook. the only one that was fully understandable for me was your video ! thank you, and keep your great job at explaining fully professional topics for young devs.
@leoMC4384
@leoMC4384 2 жыл бұрын
Great content. I implement useReducer in my project for a form that fetches values from my API to several menus, the user chooses data from the menus and the UI gets updated and the entire form data it's validated at the same time. With useState, it got pretty messy. Now with useReducer it's much better, even though my reducer function got quite long. 😀😀😀
@CottidaeSEA
@CottidaeSEA 2 жыл бұрын
Thankfully the work in your reducer can also be delegated to separate functions.
@toppmoviehighlights
@toppmoviehighlights 2 жыл бұрын
Actually tried the useReducer hook for the first time yesterday..... This has provided a valuable insight to what useReducer really is. Good job.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you! 🙏💯
@kamaboko1
@kamaboko1 2 жыл бұрын
Great video. Subscribed!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you! 💯
@ahmedmohned387
@ahmedmohned387 2 жыл бұрын
Thank you very much for this wonderful tutorial.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You're very welcome! 💯
@jeetsingh-sy5ij
@jeetsingh-sy5ij Жыл бұрын
Thank you sir, great explanation and examples. Appreciated!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad it was helpful!
@filippocamagni
@filippocamagni 2 жыл бұрын
Brilliant! Thank you so much!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You're welcome! 💯
@wahhaab7
@wahhaab7 Жыл бұрын
Thx a lot, finally understood this
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad it helped! 💯
@Programming162
@Programming162 7 ай бұрын
thank you very much you saved my time
@pfcokelly
@pfcokelly Жыл бұрын
Subbed, great tutorial!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Welcome!
@flowerofash4439
@flowerofash4439 Жыл бұрын
i lilke the way you explain this, you speak "human" thats rare to have as a programmer and very important for a teacher! subscribed!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you!
@hamzapaskingakhtar
@hamzapaskingakhtar 7 ай бұрын
Coming here from NetNinja MERN course. I was stuck on the Context part where useReducer was used. This was really a great video. Great teaching, really matches with my way of learning (spoon feeding) :P. Overall, thank you professor.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 7 ай бұрын
Glad it was helpful!
@phucwall121
@phucwall121 Жыл бұрын
Thank you so much Dave
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome!
@joakimwretlind4016
@joakimwretlind4016 2 жыл бұрын
Very nice! A really great explanation!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Glad it was helpful!
@joakimwretlind4016
@joakimwretlind4016 2 жыл бұрын
@@DaveGrayTeachesCode It really was. Do you have any suggestion on how to implement this for mouse movement, where you will have to pass x and y coordinates?
@anaslaraki
@anaslaraki 2 жыл бұрын
the best tutorial on the topic
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you! 🙏
@benarcher372
@benarcher372 2 жыл бұрын
Excellent. Now I know what to replace Redux with in my small projects.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Right on Ben! 💯
@da.b3102
@da.b3102 2 жыл бұрын
Great explanation! thanks!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You're welcome David! 💯
@sadamali6691
@sadamali6691 2 жыл бұрын
Waaaw thank you teacher dave greating you from somalia🇸🇴
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You're welcome, Wiz! And hello to Somalia! 👋
@johnforeverrules
@johnforeverrules 4 ай бұрын
i don't know whether you will see this comment or not. i just wanted to thank you for making such a high quality, easy to understand tutorial. God bless you sensei.
@dzentsetsu5607
@dzentsetsu5607 2 жыл бұрын
Very good tutorial yet again Dave! Just want to say it out loud, you really make me a better programmer with every new video. And I have a suggestion for a video... You see it really hard to grasp React for a beginner (even though I came with a diff prog. language experience) because it's so not intuitive and have so many caveats in developing process, SO it would be really helpful and useFull for us beginners if you could explain React pipeline in a tutorial video. For example, how React batching works (again basics), how component initially renders, how and why it re-renders... name a few. After watching your tutorial about calling useState twice in a row and not using prev => !prev was eye opening, but on another hand new question a raised why it working that way... Another example => I didn't know that React recreates a function and ALL inside it when state/prop updates. I think beginners will praise you for such a tutorial. Anyway, thank you so much again!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you and thanks for the suggestion! 🙏💯
@taosit5282
@taosit5282 2 жыл бұрын
Yeah exactly! I don’t know how React really works and few people bother to explain it. I’m able to use hooks and make it work somehow but that’s just improvising most of the time. When the problem I face goes beyond the typical tutorial problems, I constantly add new hooks to fix the issues that the existing hooks create, without knowing why I even need the hooks I just added. I often find myself writing 10 useStates and 5 useEffects to coordinate the states within a single component. I’m often exclusively using hooks because I can’t be sure if local variables and functions would have worked. If they do, my code would have been so much easier to read and to maintain. A tutorial on React pipeline would be very useful!
@THEJOAMS
@THEJOAMS Жыл бұрын
That helps me a lot 🙏
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad to hear it!
@gezafiqrullah5321
@gezafiqrullah5321 Жыл бұрын
thank you mr.dave :)
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Welcome!
@user-ki2xb3hk8r
@user-ki2xb3hk8r Жыл бұрын
Wow! Thankyou!!!!!
@OnlyPlayStation5
@OnlyPlayStation5 Жыл бұрын
The best video I watched for usereducer, can you please do all react hooks
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you! My React Hooks playlist has most: kzbin.info/aero/PL0Zuz27SZ-6PSdiQpSxO9zxvB0ns6m3ta
@parasmehta7793
@parasmehta7793 Жыл бұрын
Thanks man!!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome!
@lightrao
@lightrao 2 жыл бұрын
love you !
@abdallahazouz5948
@abdallahazouz5948 Жыл бұрын
nice explanation ...thanks for helping me :D
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome!
@iustin4172
@iustin4172 8 ай бұрын
Great video
@cleancode2123
@cleancode2123 2 жыл бұрын
Nice explanation of useReducer. 🙏
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you!
@pedrojunior4516
@pedrojunior4516 2 жыл бұрын
Great tutorial.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you!
useLayoutEffect vs useEffect | React Hooks Tutorial
5:16
Dave Gray
Рет қаралды 12 М.
useMemo Explained | React Hooks useMemo Tutorial
13:00
Dave Gray
Рет қаралды 28 М.
🍕Пиццерия FNAF в реальной жизни #shorts
00:41
Кәріс өшін алды...| Synyptas 3 | 10 серия
24:51
kak budto
Рет қаралды 1,3 МЛН
Watermelon Cat?! 🙀 #cat #cute #kitten
00:56
Stocat
Рет қаралды 28 МЛН
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 453 М.
Learn React Hooks: useReducer - Simply Explained!
13:48
Cosden Solutions
Рет қаралды 45 М.
6 State Mistakes Every Junior React Developer Makes
15:53
Lama Dev
Рет қаралды 263 М.
Learn useReducer In 20 Minutes
20:12
Web Dev Simplified
Рет қаралды 489 М.
The Story of React
10:05
uidotdev
Рет қаралды 246 М.
BUILD a React Timer with useRef | React Hooks useRef Tutorial
14:03
Mastering React's useEffect
25:20
Jack Herrington
Рет қаралды 170 М.
🍕Пиццерия FNAF в реальной жизни #shorts
00:41