News for hackers. Stuff that matters.
Re:Show HN: Redux Offline – Build Offline-First Apps for Web... by jasdeepsingh on Thursday March 30, 2017 @01:21PM (#13997198)
I've been using Mobx very successfully on many of my projects now (both React & React Native). I'll prefer Mobx any day over Redux, just due to it's sheer simplicity and ease of use. Read: No need to burden your brain with the cognitive load of actions, reducers, dispatching actions, selectors etc.

Mobx v/s Redux does kick off the OOP v/s Functional debate, but as a developer my productivity and effectiveness is measured in terms of my ability to ship software not in terms of my programming style, and it's my personal belief that Mobx does make me more productive as compared to Redux.

For developers new to the whole Flux/Redux/Mobx/State Management world, I highly suggest to give Mobx a try.

Re:Show HN: Redux Offline – Build Offline-First Apps for Web... by timdorr on Thursday March 30, 2017 @03:29PM (#13998198)
Maintainer of Redux here.

I concur with giving Mobx a try. I'm using it at least one product so far and it's been working out great.

One thing I will say is that because your subscriptions are set up implicitly, it's easy to have things misbehave in unexpected ways. For instance, if you update multiple observable properties in a single function, it will fire off observers multiple times. That could put you into an unexpected state and cause some errors.

Luckily, almost every time I've run into this kind of issue, I've discovered there's an API to cover that case (runInAction in the previous example's case). And they APIs themselves are really neat and fun to work with. `when` and `observable.array`'s extensions are some of my favorites.

Re:Show HN: Redux Offline – Build Offline-First Apps for Web... by Kiro on Thursday March 30, 2017 @05:00PM (#13998823)
Do you pass the MobX stores down to every child component as props or do you use @inject? I started with the former but all of a sudden all my components had all these "default" props that cluttered things up. @inject seems great but the documentation doesn't push it enough to make me believe it's best practice.
Re:Show HN: Redux Offline – Build Offline-First Apps for Web... by rawrmaan on Thursday March 30, 2017 @07:00PM (#13999677)
Neither. Just import a singleton root store and reference it directly.
Re:Show HN: Redux Offline – Build Offline-First Apps for Web... by hesarenu on Friday March 31, 2017 @07:24AM (#14002698)
I was using global stores but recently moved to @inject. I needed a way to reset my stores on logout. Hence now i create a root store and initialize rest of the stores.
Re:Show HN: Redux Offline – Build Offline-First Apps for Web... by diehell on Saturday April 01, 2017 @05:21AM (#14011321)
Can you suggest a good MobX guide/tutorial to follow or a place that keeps MobX resources such as acemarke redux lists?