Feb 5, 2019UI as an afterthoughtOr: how will React context and hooks change the game of state management? — Originally published at: https://michel.codes/blogs/ui-as-an-afterthought A question people ask me regularly: “How do all the new React features (context, hooks, suspense) affect how we build (web) apps in the future? Do they make state management libraries like Redux or MobX obsolete?” With this post, I’ll try to answer that question once…React8 min readReact8 min read
Sep 20, 2018Distributing state changes using snapshots, patches and actions — Part 2Part 2: Distributing patches and rebasing actions using Immer — In the first part of this blog post series we discussed the advantages and disadvantages of snapshots, patches and actions when building applications in which we want to distribute state changes. In this blog post we are going to build a simple distributed system that plays with these concepts. The…React9 min readReact9 min read
Sep 6, 2018Distributing state changes using snapshots, patches and actions — Part 1Part 1: Introducing the concepts of snapshots, patches and actions — Link to Part 2: Distributing patches and rebasing actions using Immer Managing state in a client-side only application is relatively simple in JavaScript. There are few constraints in place that make this easy: JavaScript is single threaded, which avoids an entire set of problems. …JavaScript7 min readJavaScript7 min read
Published inVisually Developed·Jul 19, 2018How to fix nasty circular dependency issues once and for all in JavaScript & TypeScriptGetting a grip on module loading order beyond trial and error — (this blog has a Korean translation here) In the many projects I have maintained so far, sooner or later I always run into the same issue: circular module dependencies. Although there are many strategies and best practices on how to avoid circular dependencies. There is very little on how to…JavaScript8 min readJavaScript8 min read
Jun 7, 2018MobX 5: the saga continues…TL;DR: MobX 5 changelog and migration guide Princess Proxy looked down at the crowd approaching the balcony of the throne room. “Be careful, they are after your values.” Her father had warned her. “But don’t worry, you’ll be ready for it.”. But today, on her coronation day, she couldn’t help…React2 min readReact2 min read
Mar 12, 2018MobX 4: Better, simpler, faster, smaller..and still, MobX 5 will be even more awesome 😺 — I’m proud to announce that a new major version of MobX has been released! The changelog is quite long and includes a migration guide. So, in this blog post I’m just going to highlight the most compelling new features. Btw, if you are not familiar with MobX yet, make sure…JavaScript6 min readJavaScript6 min read
Published inHackerNoon.com·Jan 10, 2018Introducing Immer: Immutability the easy wayImmutable, structurally shared data structures are a great paradigm for storing state. Especially when combined with an event-sourcing architecture. However, there is a cost to pay. In a language like JavaScript where immutability is not built into the language, producing a new state from the previous one is a…React8 min readReact8 min read
Published incodeburst·Sep 28, 2017The Curious Case of Mobx State TreeMany words, talks and articles have been dedicated to the question “should I be using Redux or MobX?” Even React books tend to discuss both nowadays. Yet there is no ‘winner’ and nor will there be (off-topic: it is even highly questionable if there is anything to ‘win’ in OSS…React8 min readReact8 min read
Published inHackerNoon.com·Jan 13, 2017The fundamental principles behind MobXA few weeks ago Bertalan Miklos wrote a very interesting blog in which he compared the proxy based NX-framework with MobX. That blog is not only interesting because it proves the viability of proxies, but even more because it touches some very fundamental concepts in MobX and transparent reactivity (automatic…JavaScript10 min readJavaScript10 min read