News for hackers. Stuff that matters.
Re:Things to learn in React before using Redux by RussianCow on Thursday July 20, 2017 @06:10PM (#14816714)
The entire Redux library is something like 300 lines of code, most of which is sanity checks. It is basically the same thing as having one root component handle all your state, it just adds a tiny bit of magic for convenience. If you're comparing that to using a completely different language, I encourage you to learn more about how Redux actually works, because it's really very simple.
Re:Things to learn in React before using Redux by eropple on Thursday July 20, 2017 @07:29PM (#14817051)
It literally IS having a root component manage state. That's what the Provider class does (enables connect() to populate via a Redux store in context).
Re:Things to learn in React before using Redux by badthingfactory on Thursday July 20, 2017 @07:50PM (#14817144)
I understand Redux, have used it many times and have read the source code. I don't understand the argument that it is "basically is the same thing as having a root component handle all your state".

It's that plus actions, reducers, dispatcher, middleware, and HoCs for connecting components to global state. So it's not basically the same thing at all.

Re:Things to learn in React before using Redux by eropple on Thursday July 20, 2017 @10:14PM (#14817608)
Actions, the dispatcher, and reducers are effectively a few in/out functions around a thing stuffed into the React context when used by react-redux. You're way overstating things.