
Michel Weststrate creator of Mobx and Immer Libraries for JavaScript
About this episode
Joel interviews Michel Weststrate, author of Mobx and his new library, Immer. Today they get into the power of Immer, its early success on Github, common mistakes in state management, and what is next for Mobx.
Immer is a light-weight, immutable state-management tool. Michel talks with Joel about some of its capabilities. Immer takes an object and a function and can track all the changes made to that object, it then gives you back the original object and a mutated copy. Immer can replace reducers, Michel calls them "producer" functions as they "produce" the new state.
Joel then asks Michel "what makes state management so hard for people and are they overcomplicating it?" This question leads to Michel explaining that people don't think enough about the structure of their state enough up front. When you talk about state, there are three distinct concepts, values, references, and identities. However, people tend to only think of state purely as data. "You have to think about what is going to store it and what is going to reference it."
Michel talks about how the mobx-state-tree fits into an application. Mobx is unopinionated; it doesn't tell you how to organize your stores. mobx-state-tree, however, is very explicit about the three concepts of state, values, references, and identities. With mobx-state-tree you organize your data into models and tell it how they relate to each other. It's all about consistently organizing your state!
What's next for Mobx? Michel is currently working on some exciting features using proxies to make Mobx even more transparent than it is now. Michel has also been thinking about improving on asynchronous processes and how to leverage async actionables.
Transcript
"Michel Weststrate creator of Mobx and Immer Libraries for JavaScript" Transcript
Resources
Michel Westrate
Joel Hooks:
Get every episode summarized
Each time egghead.io developer chats publishes, we email you a written briefing from the transcript — the topics, who appeared, and any specific claims, with the ad reads skipped.
Email me new episodesFree for 3 shows. No card needed.
Hosts & guests
No transcript yet
This episode has not been transcribed. Request it and it moves to the front of the queue.
More episodes
More from egghead.io developer chats

Full-Stack Signals in Solid, AI Development, and the Future of Web Frameworks
egghead.io developer chats

Local-First Development and Asymmetric Bets: Dax Raad on Web Dev Trends and Care...
egghead.io developer chats

Nitro, Vinxi, and RSCs - What's Good with Dev Agrawal
egghead.io developer chats

Alex Reardon on Balancing Work, Life, and Large Side Projects
egghead.io developer chats