4 ms·
I was under the impression redux is basically a message bus plus some sugar. Is that wrong?
by StuffedParrot 7y ago
I was under the impression redux is basically a message bus plus some sugar. Is that wrong?
- tempsy 7y agoNo you’re right. I find the comments deriding Redux as some bloated beast to be amusing...it’s just a thing that lets you read and update a plain javascript object that different parts of your app can access. People making things more complicated than they are is really a disease in the dev community.
- banachtarski 7y ago> it’s just a thing that lets you read and update a plain javascript object that different parts of your app can access Doesn't require a library, let alone an ecosystem of libraries.
- lowtolerance 7y agoWhy implement this functionality from scratch when a tried and tested implementation exists.
- TrinaryWorksToo 7y agoTo eliminate a dependency.
- tempsy 7y agoThe trade off makes no sense
- nennes 7y agoSo implementing everything from scratch has more benefits than a well maintained and documented dependency?
- TrinaryWorksToo 7y agoIf it's simple, yeah. A redux-type store does not have to be complicated. there are certainly performance optimizations to using redux versus rolling your own, but that would only happen in very large applications.
- nennes 7y agoI agree that you can roll your own store. You'll miss lot of free functionality and the dev tools, but maybe it's not stuff you need. I also agree that introducing a dependency at every opportunity comes with serious drawbacks. Every situation is unique of course. In my case: At work, I value code that is more standardised so that I get less bugs, documentation / best patterns and crucially easier on-boarding process. For a personal project, I would definitely consider rolling out my own implementation, even just for the learning it comes with.
- TrinaryWorksToo 7y agoYes, I agree. There are trade-offs to be considered. Those are definitely benefits to using Redux, for sure.
- shim2k 7y agoI am kind of confused, because I view HN as a strong community in terms of development skill but the comments here on Redux are really surprising..
- rudolph9 7y agoThat’s one way to think of it. The op of this thread is not wrong but the misuse has more to do with the level of discipline the average JavaScript developer employs than anything. With great power comes great responsibility!
- banachtarski 7y agoI subscribe to a different philosophy. The whole point of an abstraction is to encourage good behavior. This is how abstractions are able to be leveraged across large teams and organizations to good effect. Abstractions that do the opposite are, in fact, to blame. "Good interfaces are easy to use properly, and hard to use improperly" should be the bread-and-butter mantra of any library author, and Redux violates this repeatedly.