Hacker News new | ask | show | jobs
by runawaybottle 1913 days ago
So, I didn’t get a chance to post this last night due to being rate limited, but I’ll post it today due to my conviction that Dan Abaramov is dangerous to the JavaScript community:

I appreciate the effort and technical prowess involved, but quite frankly Redux is bad design to begin with. Dan Abramov is a smart guy but does not think clearly enough to be allowed to design APIs.

Not saying MobX or the like are any better, but we need clearer heads approaching this problem with solutions that border on one-liners. We are storing some stuff in a global for Christ sakes, can’t we simplify all of this out of the reducer/observer pattern?

I’m depressed the marketplace of ideas has not jettisoned Dan Abramov’s ideas (the reducer pattern ended up in core React).

We are all better than this.

1 comments

To me, actions is the insight in the reducer approach popular in React community. Actions and reducers force you to clearly define the logic of what can happen in a way that keeps it decoupled from the UI or some global state. When used properly, this actually helps arrive at a better and more sustainable design overall.

I’m working on a somewhat complex app and for a long time was sticking to plain useState and contexts, and lately I’m finding that moving it to a reducer (plain React, no Redux) has positive effects on architecture.

That said, the devil’s in the details—I personally think the approach is sometimes misused, including sadly certain tutorial materials. I’m reasonably new to reducers though.