ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
ต่อไป
เล่นอัตโนมัติ
Learn React Hooks: useImperativeHandle - Simply Explained!Cosden Solutions
มุมมอง 19K
Learn React Hooks: useCallback - Simply Explained!Cosden Solutions
มุมมอง 85K
Learn React useReducer Hook with ExamplesLama Dev
มุมมอง 173K
PASULOL กุ่ย นาย ฮอล และชีวิตติดหน่วงPASULOL
มุมมอง 5M
"ประวิตร" ฉุนจัดคุมตัวเองไม่อยู่ตบหัวสื่อ สังคมรุมประณามพฤติกรรมไม่เหมาะสม : Matichon TVmatichon tv
มุมมอง 553K
เปิดสนามซีซันใหม่ การแข่งขัน RoV Pro League 2024 Winter | รอบเก็บคะแนน Week 1 Day 1Garena RoV Thailand
มุมมอง 1.1M
Learn useReducer In 20 MinutesWeb Dev Simplified
มุมมอง 501K
Fetching Data in React - Complete TutorialCosden Solutions
มุมมอง 110K
Every React Concept Explained in 12 MinutesCode Bootcamp
มุมมอง 558K
Learn React Hooks: useEffect - Simply Explained!Cosden Solutions
มุมมอง 134K
Why Signals Are Better Than React HooksWeb Dev Simplified
มุมมอง 470K
Learn React Hooks: useMemo - Simply Explained!Cosden Solutions
มุมมอง 91K
Custom Hooks in React (Design Patterns)Cosden Solutions
มุมมอง 40K
Typescript Mistakes Every Junior Developer should Avoid | clean-codeCoderOne
มุมมอง 286K
The problem with useEffectCosden Solutions
มุมมอง 33K
7 Days Stranded In A CaveMrBeast
มุมมอง 38M
ONE ลุมพินี 75 Full Fight | 16 ส.ค. 2567 | Ch7HDterodigital
มุมมอง 608K
芙蕾雅居然出轨了?乔后悔了#shorts #Fairy#fairytales精灵少女
มุมมอง 579K
ดึง “ประชาธิปัตย์” ร่วมรัฐบาล แทน “พลังประชารัฐ” | ข่าวค่ำ | 17 ส.ค. 67Thai PBS
มุมมอง 461K
ออกพรรษาน้ำตาหล่น - แอน อรดี [OFFICIAL MV]หมอลำใจเกินร้อยofficial
มุมมอง 102K
Hope you enjoyed the video! I also have a really cool and unique course that will teach you way more than this video. You'll learn how to build an actual complex project with React. It's called "Project React" and you can find it at cosden.solutions/project-react. Also, I have a free weekly newsletter called "Import React" with tutorials, news, and cool stuff about React! You can sign up at cosden.solutions/newsletter?s=ytc
Dude, you are soooo underrated. 600 views? this video deserves a million views. can't even tell you how many different videos i watched about useReducer and finally you found a way to explain it perfectly. Finally got it 🙏🙏
thank you thank you thank you..
I'm really glad to hear that! ☺️ thanks a lot
honestly, you're underrated. i learned more things from you than my college course.
Agreed. Definitely channel to recommend.
I just want to say that these react hooks videos are by far the best and easiest to understand. They are fantastic for new devs and senior devs just getting into react. 😊
This series on React hooks has been super informative. Really appreciate this content, these may be the best explanation videos I have ever watched, for any language.
Damn, thanks! Means a lot 🤙
Thank you so much Cosden! I've seen so many videos but it's just amazing how you are making this so simple.
There is no other way to explain it easier than you did in this video... just mindblown :) Thanks for the video Cosden! 👏
glad to hear it!
I feel like I just made it over a slump/ hurdle I’ve been stuck in for too long. But seriously… you’re videos have been SO helpful is getting over these hang ups. I appreciate what you’re doing here.
Please keep up doing videos like that! Very concise and clear!
Will do!
1:28 to 1:48, just summarization and I already got what it does. I did not use it really, but used redux, so it absolutely made sense. Thanks!
Thank you so much! Your channel will grow lots with your great, clear, and concise explanations!
It's important to understand the strictness of immutability is enforced. If you don't return a new object in your reducer the component will not re-render. This is a bit different if you're coming from redux-toolkit. Redux toolkit will give you a brand new object in your reducers. Great video
Super clear and explanation again, the last example drove home the point on when to use it
Darius, This is great,
Thank you so much for these contents you put out, i just joined the discord and i am excited about what you have on there, it is really mind blowing...
I want to suggest if you can make a YT short video, to talk about sample scenarios when it's is suitable to use useReducer instead of useState.
I feel this might clarify things better for Jr react devs like me.
Thank you.
even my english is very bad but i can understand evry word you saying , and that's help me to get the information , thanks bro❤
Great video as always
Thank you for explaining things so clearly! I finally understand the useReducer now!
I do have one question. Around 12:19 you mentioned that "[useReducer] can update multiple pieces of state at once. If we had done this with useState, you probably would have had a state value for count and then a state value for error"
I'm a little confused about what you meant by this. Are you saying that you would need two separate states for count and error?
Couldn't we have a state that holds an object with both count and error values and do the same thing in the useReducer example, like this:
const [state, setState] = useState({ count: 0, error: null });
const increment = () => {
setState((prevState) => {
const newCount = prevState.count + 1;
const hasError = newCount > 5;
return { ...prevState, count: hasError ? prevState.count : newCount, error: hasError ? "Maximum reached" : null };
});
};
const decrement = () => {
setState((prevState) => {
const newCount = prevState.count - 1;
const hasError = newCount < 0;
return { ...prevState, count: hasError ? prevState.count : newCount, error: hasError ? “Minimum reached" : null };
});
};
Your content is really very useful. Easy and simple. It makes it easy for me 🥰🥰🥰
The way you explain is very similar to Jonas Schmedtmann😅🥰
Great video. I've watched several vids trying to explain useReducer, and each time a little more sinks in, I just have to go and use it. It looks so simple when it's all on one page within one component. but when I have several pages and several components, and then need to throw it into a useContext or something for it to be accessible to them all
Yep exactly, that's actually what redux is! So you may want to consider it if your state is big enough
I think if you find yourself having to update 4+ instances of state that all depend on each other in some capacity, its time to use useReducer
I heard a simple rule of thumb saying to useReducer() when updating objects in the state and useState() when updating simple, primitive variables.
The 12:18 explains it.❤
I first of all like your video before watching - that tells you the confidence I have in you. I'll follow you on social media if you make your handles available and more...
all my handles are the same as this one, @cosdensolutions
Great explanation.
The best explanation I've ever heard. I wish the best from Ukraine
Very clearly explained. Thanks for making this . Subscribed.
Thanks a lot! Generaly, I work with zustand state manager. And I see that I can use either useReducer or zustand to reach this result, right? Which one is better to use?
Such a great tutorial! Thank you and just subscribed :)
perfect master😍😍
I'm really greatefull to you for making video like these.......
Great video! You helped me a lot. Thank you
Hi!
kind of new here with Reducer.
If I'm not wrong, while calling the dispatch function, it basically calls the reducer function, and takes the the "action"(2nd params) as the actual parameter by ignoring the "state"(1st params) by default. Is that correct?
very nice! But as a teacher it is also good to speak a little slower...that would be my wish. I ´ve seen lots of tube videos, where guys think to be clever and don´t think about pupils learning and bombard with talking...
I remember again why I use Vue 😄
Please try to do series on storybook, react testing and typescript
thank you so much for the explanation!
im currently rewriting this complex ui that was using useState to useReducer. I was using array index to track items and React kept getting confused and not updating the correct item. now 3 days laters it still doesnt work. Glad to see React become the new jQuery. Front end sucks
All things Simply Explained exactly.
Thanks
I'm a visual learner, and him murmuring about the technicalities and jargon instead of showing it then explaining what he did makes this tutorial painful to follow yet its still sufficient, ty
You are right,,,he does not teach he just comment on code
“Learning styles” are a myth.There’s no such a thing as visual learning. Differences in IQ is what determines the difficulty of learning. You’re just slow bro
I watched and I understand, there is no problem on the tutorial
The whole difference between other explanations is that Darius explains when and why to use it. If all you want to see is people typing useReducer then why watch this tutorial?
thanks
Really great video
hi,
great tutorial
what is this browser you used in this tutorial
Nice explanation! Really enjoyed that :)
May I ask if you can do videos on implementing Typescript + React in Clean Architecture/DDD? These topics and specific tech stack are very few in this space, and would be valuable to junior devs who join bigger teams...tq! Hope to join the discord soon!
Glad you liked it! I'm actually building an app live from scratch where I talk about these things, you can check it out! The first video is posted already. I'll eventually make more specific content around that too but for now there's the live where it's an actual project
Video on RTK query?
you earned my subscribe (Y)
voy aprendiendo y tambien me voy enamorando jajajajajajajajajajajajajaja muchas gracias🌹
mi crush de react, amor al primer video 😍 jajajjajjaja
useReducers looks like the complicated version of useState..what am i missing? lol
It is hahah but it's useful when you have complicated state and want to handle it predictably
Just great !!!
Thank you!
Really Good
Awesome
Bro ,we need beginners react project
it would be better if you did not used typescript
They're right its painful to follow. The way you explain things is not begginer friendly. I think you should explain while coding line by line.
I think these are some of the best descriptions of react hooks I’ve ever watched.
i'll never understand this stupid hook 😢
yes, you will, you just watched my video! ☺️
@@cosdensolutions ive watched tons by many different great channels and still makes no sense to me i understand the use of it but not the structure of it
trust me i know how u feel, but dont give up , im not giving up untill i master this shit !
The useReducer hook, so clearly and succintly explained. Thank you very much.
PS One of the few Tutors to illustrate React with TypeScript code. You have to be commended for that.
{2023-10-18}
Glad it was helpful!