News for hackers. Stuff that matters.
Re:Reasons to Learn Redux as a JavaScript Developer by StuffedParrot on Wednesday January 01, 2020 @02:36AM (#21927107)
I was under the impression redux is basically a message bus plus some sugar. Is that wrong?
Re:Reasons to Learn Redux as a JavaScript Developer by tempsy on Wednesday January 01, 2020 @02:46AM (#21927127)
No 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.

Re:Reasons to Learn Redux as a JavaScript Developer by banachtarski on Wednesday January 01, 2020 @02:49AM (#21927134)
> 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.

Re:Reasons to Learn Redux as a JavaScript Developer by lowtolerance on Wednesday January 01, 2020 @07:34AM (#21927795)
Why implement this functionality from scratch when a tried and tested implementation exists.
Re:Reasons to Learn Redux as a JavaScript Developer by TrinaryWorksToo on Wednesday January 01, 2020 @08:01AM (#21927861)
To eliminate a dependency.
Re:Reasons to Learn Redux as a JavaScript Developer by nennes on Wednesday January 01, 2020 @04:57PM (#21931016)
So implementing everything from scratch has more benefits than a well maintained and documented dependency?
Re:Reasons to Learn Redux as a JavaScript Developer by TrinaryWorksToo on Wednesday January 01, 2020 @05:04PM (#21931058)
If 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.
Re:Reasons to Learn Redux as a JavaScript Developer by nennes on Wednesday January 01, 2020 @06:33PM (#21931574)
I 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.

Re:Reasons to Learn Redux as a JavaScript Developer by TrinaryWorksToo on Wednesday January 01, 2020 @07:01PM (#21931742)
Yes, I agree. There are trade-offs to be considered. Those are definitely benefits to using Redux, for sure.
Re:Reasons to Learn Redux as a JavaScript Developer by tempsy on Wednesday January 01, 2020 @02:24PM (#21929927)
The trade off makes no sense
Re:Reasons to Learn Redux as a JavaScript Developer by shim2k on Wednesday January 01, 2020 @09:14AM (#21928082)
I 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..
Re:Reasons to Learn Redux as a JavaScript Developer by rudolph9 on Wednesday January 01, 2020 @02:51AM (#21927140)
That’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!

Re:Reasons to Learn Redux as a JavaScript Developer by banachtarski on Wednesday January 01, 2020 @02:53AM (#21927147)
I 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.