4 ms·
I am confused why people think Redux is complicated. Maybe you were trying to use React-Redux? Redux itself seems incredibly simple to me, so simple that I some
by kasbah 10y ago
I am confused why people think Redux is complicated. Maybe you were trying to use React-Redux? Redux itself seems incredibly simple to me, so simple that I sometimes wonder if I need a library for the functionality at all.
This "Redux in a nutshell" sums up the simplicity nicely I think: https://gist.github.com/MarcoWorms/30758235f05faec844b8c06ce2e5bac9 https://gist.github.com/MarcoWorms/30758235f05faec844b8c06ce...
- sotojuan 10y agoI've had the same experience. It took me about a week to "get" Redux as a new-ish dev back a year or so ago. Why do you think people have trouble with it?
- ashark 10y agoI've found it really easy once I stopped thinking about it in the way it's presented at all. The use of the term "action" is especially misleading. Easier to think of it as two event dispatchers hooked together (which is more or less what it is).
- throwaway2016a 10y ago> It took me about a week to "get" Redux You hit the nail on the head. Devs these days get frustrated if it takes more than an hour.
- clay_to_n 10y agoI think the different parts are confusing. As a dev learning about it for the first time, "Action Creator", "Store", and "Reducer" don't mean anything. Is "Store" a database connection? "Reduce" sounds like functional programming, sounds hard. Why "Action Creator"? Aren't actions objects that I can create with "new"? For me, I also didn't understand the value in splitting it into those pieces - when I was learning Redux, I kept wondering "why aren't these just pub / sub events? Can't you do this with an event bus?" I think most devs aren't used to learning new high-level patterns. Most know MVC, maybe a couple others, but I think Flux / Redux are a bit more complicated (by nature) than that. I doubt anyone interested in Domain-Driven Design or Clean Architecture would have an issue picking Redux up, but those devs are the exception.
- lawik 10y agoI watched a talk at a meetup on Redux. Loved the idea. Tried to try it out with React or Vue and had a lot of trouble getting going. I'm still fond of Redux as a concept but I've mostly had trouble trying to get the rest of my needs met. I'll try again at some point.
- rickyc091 10y agoI don't think people are having problem with understanding how redux work, but having problems with the shear number of boilerplate files you have to write to get anything done. Often times the speed at which you can get things done is equated to productivity.
- mabbo 10y agoI've never been any good at frontend work. Everything I've made has always gotten messy, fast, and eventually it's an unmaintainable mess. React-redux just made it all cleaner, easier. There was a nice tight constraint on what I could do- want something to happen? Call an actionCreator, let the action change the state, re-render. Constraints free you. The last four months have suddenly seen me shift from 'leave UIs to the devs who can do that' to 'Oh, we need a whole new page to show some reports? I'll have it done today'.
- Jare 10y agoI was a relatively early adopter of Redux and, while I understand the appeal of the architecture and mental model, I was always annoyed by the boilerplate (to turn plain language functions into serializable events) and unclear approach to modularization (single state tree is too much like a global). For moderately complex apps I found the practical downsides of those heavier than the pros of unidirectional flow and reproducible execution. Haven't touched it in over a year so I can't say if things are better, but somehow I doubt it.