Тёмный

Learn React useReducer Hook with Examples 

Lama Dev
Подписаться 326 тыс.
Просмотров 176 тыс.
50% 1

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

 

27 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 278   
@ramiov3862
@ramiov3862 2 года назад
I've realy never seen any one who explains React hooks so well and all it's possible uses as well as what mistakes to avoid, This kind of knowledge is really what we are missing as junior developers, And i realy appreciate the effort man Thanks !
@a4yster
@a4yster Год назад
Not sure why its easier to understand your way of explanation but it definitely is. Probably it's about voice - you are very calm and well paced. Like Neagoie is overly ecstatic, Schwarzmuller is explaining like he is a drill sergeant in the army, Fireship takes an entire 3.7 seconds to explain even the most complex topic. You, meanwhile, keep the consistent pace.
@emilworken7635
@emilworken7635 2 года назад
Probably one of the best explanations I've seen on React Hooks. What i particularly like is the structure of the video: 1) Introducing the hook and it's use cases in short 2) Explain alternative methods (useState) that are easy to use , although can be made better (useReducer) 3) Start with an easy example and structure of Syntax 4) Progress to more advanced example The pace is perfect and explanations are top-tier. Really liked how you built in a useRef example as well, as this is something that junior devs can have a similar feeling around when it comes to use it compared to e.g useState and handleChange for a specific input-field. 10/10.
@shujin9027
@shujin9027 Год назад
He forgot to say "use mobx" at the end
@SushilKumar-ig8ls
@SushilKumar-ig8ls 2 года назад
Such a simple explanation and great way to handle large states. LOVED IT ♥
@MathaGaram
@MathaGaram 2 года назад
There are lots of people who know the concepts very well, but very few can explain to the pin point. This guy is on of them.
@Reel_InsightYT
@Reel_InsightYT 2 года назад
Awesome Video...Always Wating for lama's tutorial
@morphine496
@morphine496 2 года назад
Daaamn, exactly what I was looking for, I have a job interview in 5 days and this is going to help me a lot with the app I have to create. Thanks for sharing this with us Lama.
@jasonlu6405
@jasonlu6405 2 года назад
This is so informative but easy to understand! Please make a series about Hooks and their use cases. Thanks in advance!
@Abhisumant03
@Abhisumant03 Год назад
U said it and u did it . "If u have playlist u will definitely save this video there and yus i did ." One of the best video ever for usereducer hook ❤️❤️❤️❤️ thanks . Pls keep making such small videos by taking these important topics .
@luizarnoldchavezburgos3638
@luizarnoldchavezburgos3638 2 года назад
Lama keep doing this serie of videos. I will support you, I have shared to my friends too. Thanks for the explanation.
@ShubhamSingh-gk8vp
@ShubhamSingh-gk8vp 2 года назад
Omg i was just learning useReducer ! Awesome video !!!!!
@chamonmath7688
@chamonmath7688 2 года назад
This is very helpful. It's one thing to explain it, but the way he shows visually where things go with his cursor how things are connected, and it goes from here to there. Even gives a little flow chart and uses an example that I'm used to seeing with useState and then shows it's similiarty on how it's done with useReducer and cleans up the code. All around Great stuff the video was short too. 👍
@wahidsakib
@wahidsakib 2 года назад
I was struggling with useReducer, Oh man! You saved me.
@andrijadenic4586
@andrijadenic4586 Год назад
I can't belive how awesome you are! Please keep teaching us in simple English as you do. Wish you all the best!
@mahmoodnazari1004
@mahmoodnazari1004 Год назад
One of the best tutorial I've ever seen. Could you please make a video about using useReducer with a multi-step form.🙏
@osho4609
@osho4609 11 месяцев назад
No words for the knowledge man!
@nithish1742
@nithish1742 Год назад
One of the best explanations I have ever seen
@mehmetnadi8930
@mehmetnadi8930 Год назад
please do not stop making awesome tutorials! laerned so much from you! thank you
@estebansalazar5194
@estebansalazar5194 2 года назад
grats bro, your explanation was so well. I just started to work in my job with context accompanied by useReducer and typescript and i had been so confused principally because i hadn't had experience with this hook so far. But this video lit me up like the morning lights. Thanks so much i appreciate your effort doing this kind of videos :)
@georgesword2012
@georgesword2012 Год назад
Thanks ❤ One of the best tutorials about useReducer hook ❤️
@ОлексійКудряшов
@ОлексійКудряшов 2 года назад
thanks Lama! for your excellent tutorials and content! by thank you I mean joining the sponsoring group))
@LamaDev
@LamaDev 2 года назад
Thanks for your support :)
@Fer0710
@Fer0710 Год назад
This is a great explanation on how to implement the userReducer hook
@karthikraju6225
@karthikraju6225 2 года назад
This is such an amazing series about React hooks. Will be using this a lot for reference. Thank you so much!!!
@davidmukalay3536
@davidmukalay3536 2 года назад
One of the most useful React skill have learned so far
@zillboy
@zillboy 2 года назад
Dear Mr.Lama Dev, Keep these videos coming, this helps improve us going from junior to senior dev. :)
@harvard004
@harvard004 5 месяцев назад
This it the best useReducer tutorial on the web.
@FoodBitesTV
@FoodBitesTV 2 года назад
This tutorial is really great! I appreciate the extra effort showing process diagram and explanation on each parameters&arguments which actually help to better understand. thanks a lot
@CodeWith-Lee
@CodeWith-Lee Год назад
Yeah this is the video I was looking to watch for this topic. Thank You ..
@yohannmartinez7459
@yohannmartinez7459 2 года назад
Great video, useReducer is a good way to exclude and manage well the logic of a components, for performance reasons i think that your ADD_TAG function should send all tags and not 1 by 1 but works well like this too :)
@g.c955
@g.c955 2 года назад
yeah, I'd use a Set for tags and payload will tags directly. But I guess it's not really the point of this video :)
@DTUSEM
@DTUSEM 2 года назад
I think then you need to split them in reducer files.
@g.c955
@g.c955 2 года назад
@@DTUSEM what's wrong with `tags: new Set([...state.tags, ...payload])`, which would also remove any duplicates?
@usmanmalik3575
@usmanmalik3575 Год назад
Lama thank you so much for everything, you are a true legend 🙌🙏
@francescoPace27
@francescoPace27 Год назад
You are such a great teacher! Thank you very much for your work and keep going!
@hameeeed5992
@hameeeed5992 Месяц назад
Very clear and precise
@mraaroncruz
@mraaroncruz Год назад
Dense and well explained. Thank you!
@harshbhardwaj6060
@harshbhardwaj6060 7 месяцев назад
the best thing to do for complex topics is show how a particular that thing can be used in real world. Even if as a watcher I don't understand the whole thing but I know places where it needs to used so that I can try to use them there right away in my projects and It helps to better under stand them.
@ImranKhan-ft7ns
@ImranKhan-ft7ns Год назад
Thank you.. Your explanation is beginner friendly
@parmaryash4406
@parmaryash4406 2 года назад
Amazing explaination
@joshchant5003
@joshchant5003 2 месяца назад
That keyboard is heaven oh my
@alainrakotoarivelo7651
@alainrakotoarivelo7651 Год назад
Thank you for sharing this tutorial about useReducer ❤
@احمد-ص4د3ق
@احمد-ص4د3ق 2 года назад
Great explanation Lama Dev
@YoutCode0263
@YoutCode0263 5 месяцев назад
short + effective + worth + valuable 😊❤
@gauravdwivedi-h5t
@gauravdwivedi-h5t 3 месяца назад
This is masterpiece of useReducer . Salute to you. Appreciate 🎉
@dubaifatimaali
@dubaifatimaali 2 года назад
Definitely going to try it. Thanks and keep on posting.
@丂卂丂乇匚卄丨卄卂
Clean explanation ❤, Thank you so much
@kamonahmedreal
@kamonahmedreal 2 года назад
love you sir, been wait for a long time
@adityagoswami6881
@adityagoswami6881 3 месяца назад
Very informative .Thank you Sir 💯🙏
@MTran-r8c
@MTran-r8c 4 месяца назад
This video is really helpful! Thank you so much! ❤
@parmaryash4406
@parmaryash4406 2 года назад
Amazing series
@shahemhaddad2717
@shahemhaddad2717 Год назад
Man your videos are fabulous keep going 👌
@gustavomanca
@gustavomanca 2 года назад
This is one of the best explanations I've ever seen 🙌
@xcrxwadda8287
@xcrxwadda8287 2 года назад
Thanks for this... keep dropping such topics ... very helpful , God bless you Lama
@aishvaryamohite5985
@aishvaryamohite5985 8 месяцев назад
Very nice video...I get a very much idea ...only 15 min of your video...thank you🎉
@MikdanJey
@MikdanJey 2 года назад
Excellent explanation 👍🏼
@noobdev4181
@noobdev4181 Год назад
Great explanation. I just found your channel today. Subscribed. Thank you. Please do a playlist explaining all available react hooks. 💙
@remi6819
@remi6819 2 года назад
We love to know what is a best way to do something, to increase performances, thanks !!
@jayantvasantkenjalkar6798
@jayantvasantkenjalkar6798 Год назад
you are awesome, a quality explanation i can see here !!
@asvicnal8483
@asvicnal8483 2 года назад
This really helps a lot, Thanks.
@emmanuelakogwu9078
@emmanuelakogwu9078 2 года назад
LAMA DEV remains the bestest(if there is a word like that)
@luanalves3419
@luanalves3419 Год назад
Great content!! greeting from Brazil
@kishoreandra
@kishoreandra 2 года назад
yet another informative video, thanks Lama 🙌
@ipunkk3578
@ipunkk3578 2 года назад
I love it how you explain the concept and give an example, everythings clear.. Have u ever made tutorial about useEffect clean up function? I thinks its bit complicated to understand by reading on the documentation.. Thankyou so much!
@mohammed.haydar
@mohammed.haydar 2 года назад
This is absolutely and beautifully explained
@marcusviniciuskoch550
@marcusviniciuskoch550 2 года назад
incredible content, ill try to use it on my job
@loyaltythameem
@loyaltythameem 2 года назад
Wow really awesome 👍😎. Thanks brother
@willyhorizont8672
@willyhorizont8672 2 года назад
Thanks great video! Please make the useCallback and useMemo too
@hematw
@hematw 4 дня назад
Added to My list 😊
@hn031
@hn031 2 года назад
Thanks, man. Subscribed.
@psyferinc.3573
@psyferinc.3573 Год назад
i so love your process.
@kylewillcox5775
@kylewillcox5775 2 года назад
Love your tutorials, thanks for explaining them so coherently!
@儒雅随和带带大师兄
😮 So skillful. I need some time to digest.
@orashusedmund7675
@orashusedmund7675 Год назад
thank you very much sir. this was so clear.
@rastapoile
@rastapoile 2 года назад
Thanks a lot for your videos !
@nicodipi
@nicodipi Год назад
Great video man!
@saljeshmaharjan6760
@saljeshmaharjan6760 Год назад
such a wonderful explanation, thank you
@slipstream01
@slipstream01 Год назад
we need a react course from you.
@thesouthsidedev1812
@thesouthsidedev1812 2 года назад
Thank you fro this series
@mishucodes6982
@mishucodes6982 Год назад
Amazing video thank you so much bro ❣
@rishavmehta6198
@rishavmehta6198 2 года назад
Very informative tutorial. Please make a video on useMemo and useCallback hooks.
@4nkitpatel
@4nkitpatel 2 года назад
+1 subscriber --> awsome video the journy was perfect and learned what exactly needed
@Mauaka
@Mauaka Год назад
If anyone is keen for a shorthand version of a useReducer, you can do something like this: const [state, dispatch] = useReducer((state, nextState) => { return {state, ...nextState} }, initState) // you still need to have initial state/default values for the reducer's state dispatch({ property_key_to_update: new_value }) // to update a value in the state, use dispatch
@havefun5519
@havefun5519 Год назад
Clear explanation, thx
@roshanpaudel6352
@roshanpaudel6352 Год назад
Nice kind of explanation ❤
@letsdoitsatumare
@letsdoitsatumare 2 года назад
Great work, Lama!
@rajankhunt7002
@rajankhunt7002 Год назад
Very good video please make more video like this and on react only react
@Terrajin444
@Terrajin444 2 месяца назад
Great explanation! I'm just wondering, why is it called a Reducer? What's being reduced?
@Pareshbpatel
@Pareshbpatel 2 года назад
The React useReducer hook beautifully explained. Thanks, Lama Dev {2022-08-17}, {2022-08-31}
@fenixx0704
@fenixx0704 2 года назад
omg, this video contains incredible explanation of that hook for beginners. It would have been so nice of you, if you could also do such explanation of useContext and maybe few more🔥🔥🔥👍👍👍
@kvazimode2
@kvazimode2 Год назад
Bravo! Thank you!
@hakkicengiz
@hakkicengiz 2 года назад
Şafak mükemmel bir örnek 👏👏
@parassharma7041
@parassharma7041 2 года назад
Love your channel thank you
@Music4Life2015
@Music4Life2015 2 года назад
Great video !!!
@touseefghazanfar8487
@touseefghazanfar8487 2 года назад
Great tutorial
@shabtikaplan
@shabtikaplan Год назад
You can do this with useState and a handle function with switch case logic
@malemyengkhom56
@malemyengkhom56 2 года назад
Would like to see useCallback and custom hooks
@tanvirazad49
@tanvirazad49 Год назад
very much helpful!
@zhongtom2625
@zhongtom2625 2 года назад
Hello Lama, thanks for the video. Am I correct that the advantage of useReducer over useState is in the reducer function, not the single state? the number of states does not reduce, we just wrap it in an object and it is actually more difficult to change a signle state. But if we use useState, the functions to change states needs to be inside the component, and makes the component really long. When we could import the reducer function, we could seperate the complex logic from the component.
@minsungsuh3872
@minsungsuh3872 2 года назад
Thank you so much for this well-made tutorial! Would you be possible to make a lecture for Redux Toolkit?
@jgttech
@jgttech 2 года назад
The idea of updating multiple states using useReducer is no longer true in React 18. As of React 18, state changes in side effects are batch updated. So, if you updated multiple states, from a response to another change in state using multiple state updates are batched. The best use case for useReducer, at this point, is complex data structures.
@adtc
@adtc Год назад
A really good use case is to provide global states through Context Providers and custom hooks. This is best done using a useReducer hook whose dispatch function is the value of the context provider in the custom hook. Super useful, and possibly the only way to do it. Can't do it with useState. Actually, that's the only reason we import useReducer in our projects. We don't import it for anything else. Other than that, and complex data structures as you mentioned, this is actually overly complex for what can be done with three lines of state variables created with useState. Sometimes it can be justified, when you're able to logically group state updates into actions. But mostly it's not really useful to replace a bunch of useState with one useReducer just because you can. It makes code unnecessarily harder to read.
@nayemali310
@nayemali310 2 года назад
make video on image loading and how to increase website speed
@red-ouz
@red-ouz 2 месяца назад
Thank you very much
@marcusmalcomm6195
@marcusmalcomm6195 2 года назад
The tutorial is awesome and useful. Could you also suggest a way for state control and faster rendering a table with thousands of rows where the table cells are all text inputs without pagination? Thanks :)
Далее
Самая сложная маска…
00:32
Просмотров 1,1 млн
6 State Mistakes Every Junior React Developer Makes
15:53
The problem with useEffect
11:37
Просмотров 34 тыс.
CSS Tips And Tricks I Wish I Knew Before
12:12
Просмотров 480 тыс.
Learn useReducer In 20 Minutes
20:12
Просмотров 508 тыс.
Top 6 React Hook Mistakes Beginners Make
21:18
Просмотров 573 тыс.
ALL React Hooks Explained in 12 Minutes
12:21
Просмотров 131 тыс.
State Managers Are Making Your Code Worse In React
13:33
You might not need useEffect() ...
21:45
Просмотров 161 тыс.
Самая сложная маска…
00:32
Просмотров 1,1 млн