What is a JavaScript Reducer Function???
HTML-код
- Опубликовано: 10 сен 2024
- If you have started to learn about state management with JavaScript then you have likely heard about reducer functions. This video explains the concepts behind reducer functions with a couple simple examples.
Code from video: gist.github.co...
The Archer reference was.... chef's kiss! Thanks for the tutorial!!
Steve, as a new subscriber I wanna say a big thank you! I have watched quite a few of your videos and the explanation's always stellar! Keep on rocking
best way to explain this concept!!!! Redux becomes a piece of cake !! Your friendly way of explaining complex concepts is magical!!!
..Although, for the benefit of the readers... i want to point out that....
....
The simplest way to understand a reducer is to think of reducer operation flow as unidirectional.... they just go 1 way from left to right.... reducing --> reducing more --> reducing more more -> reducing more more more .... how to reduce them is decided by actions (i.e.- strategy).......
I'd like to join Mobile app dev course prof. Steve, but right now I'm into Web dev course. Neat explanation of Reducer!
Sorry you are going to miss out on all the cool web dev stuff that we do.
@@SteveGriffith-Prof3ssorSt3v3 I was afraid I'd miss all the fun part of web dev :( it does hurt. By any chance can I change my course in the winter intake?
@@avinashgardasalgonquin4371 we don't have a winter intake, only Fall.
I go to your videos over videos by people like mosh or Cs dojo now. Not to say they aren't great teachers but I find your manner of casual explanation and example to be more understandable. Thank you.
Perfect! This explains the concept with vanilla Javascript. So good to know the basics from where the concept originates. Thank you!
We can now manage state in simple apps that need it, but don't need the whole React library I guess!
It's Redux that you don't need when you manage your own state.
With the new Context API plus the useState and useEffect hooks you can do most of what Redux was doing.
Redux was always something that you needed for larger solutions anyway. Simple sites worked fine with setState and passing props.
React is the virtual DOM part that creates views. With react-dom you render to the browser and react native lets you render your views as actual native components. You could, if you want, build your own virtual DOM with vanilla JS... then you need the code to compare and watch for changes (the harder part to do efficiently).
Thank you Steve!
@@SteveGriffith-Prof3ssorSt3v3 yes Steve!
Thank you so much. The video i watched before yours didn't help me a lot. Your video gave me a crystal clear explanation
Thanks for your comprehensive explaination about this topic Steve, you are amazing
This video should be required to explain the basic concepts Redux uses.
This is a great explanation!
The tactical turtleneck!
Really nice video!
BTW, why are these functions called 'reducers'?
They reduce the old state, the action, plus potential new values into a single new state value.
@@SteveGriffith-Prof3ssorSt3v3 makes sense. Thank you!
pretty comment in React went dealing with complex state or working with Redux