HNHacker News
TopNewBestAskShowJobs

ikido

14 karma · joined January 14, 2016

submissionscomments
ikido··on Coursera Machine Learning MOOC by Andrew Ng – Python Programming Assignments
While I don't think that posting solutions or using them is the right thing to do I'm grateful to the author for mentioning the course — it's fantastic!
ikido··on Bots won't replace apps. Better apps will replace apps
Very valid points addressed in this essay, I wonder if OS and messengers vendors will ever take that into account
ikido··on Mobx: Simple, scalable state management
can you elaborate more why this approach is convoluted?
ikido··on Mobx: Simple, scalable state management
Thanks, I'm actually working on it
ikido··on Mobx: Simple, scalable state management
The concept of tracking data is actually quite simple — when you define some object property as observable it is replaced with a getter & setter that invoke a callback when you get/set that property. Then you can bind a function that will be called when data is changed (via setter).

You can also wrap some code into special autorun function, that will track what observable data was accessed, and when that data changes, that code will be called again.

But wait, there's more =) It works with arrays, objects and other types, check out the docs!

ikido··on Mobx: Simple, scalable state management
That's a good point, but in Redux you subscribe to all changes in single state tree where all data lives. That means that every update of data (which has no upper limit) will cause your UI to re-render. Sure, you can implement shouldComponentUpdate, but still it will be called on every state update, plus you do can do exactly the same with mobx. The difference is that with mobx you subscribe to changes of certain data, and it happens automatically.
ikido··on Mobx: Simple, scalable state management
No difference in how you handle routing and history in a regular React app, those things are not related. Mobx (and mobx-react) just re-renders your component when data changes. You can check out performance tests here: https://www.mendix.com/tech-blog/making-react-reactive-pursu...
ikido··on Mobx: Simple, scalable state management
I know that a lot of people like to use different kinds of flux libraries for their React apps, with Redux having a lot of traction, but you should definitely look at Mobx.

We've introduced it to one of our project 4 months ago and our state management became as simple and easy as it should be with React. No boilerplate subscriptions, no helpers that modify normalized data, no endless re-renders on every state change and very easy to understand concept for new developers.

We literally stopped worrying about the state though it took some time to rewrite the app.

ikido··on Show HN: A new kind of standing desk for $25 USD
Doesn't look very ergonomic — it's kind of hard to keep your hands in the air for a long time