随笔分类 - MST
摘要:Since MST offers a runtime type system, it can create and compose types on the fly, making it possible to reuse logic in new and powerful ways. In thi
阅读全文
摘要:MST has a pretty unique feature: It allows you to capture private state on models, and manage this state by using lifecycle hooks. For example by sett
阅读全文
摘要:Let's stop hardcoding our initial state and fetch it from the server instead. In this lesson you will learn: Set up basic data fetching Leverage the a
阅读全文
摘要:In real life scenarios, many operations on our data are asynchronous. For example, because additional recourses need to get fetched. MST has first cla
阅读全文
摘要:n this lesson, we will set up Hot Module Reloading(HMR), making it possible to load new definitions for React components and MST models and apply them
阅读全文
摘要:For an optimal user and developer experience, storing state in local storage is often a must. In this lesson you will learn: Using onSnapshot to get n
阅读全文
摘要:It is time to add new entries to the wishlist. We will achieve this by reusing forms and models we've built so far. In this lesson you will learn: MST
阅读全文
摘要:In this lesson we will dive a bit more into the tree semantics of MST. In this lesson you will learn: Actions can only modify their own subtree The us
阅读全文
摘要:We will expand our UI, and give the user the possibility to edit his wishlist. We will use the earlier defined actions. We also will use model clones
阅读全文
摘要:Redundant data or caching data is a constant source of bugs. MST adheres to the philosophy that no data that can be derived should ever get stored. In
阅读全文
摘要:Testing models is straightforward. Especially because MST provides powerful tools to track exactly how your state changes over time. Track snapshots,
阅读全文
摘要:Models are not just a nifty feature for type checking. They enable you to attach behavior to your actions in a straightforward and highly discoverable
阅读全文
摘要:In this lesson, we introduce the running example of this course, a wishlist app. We will take a look at the core of mobx-state-tree (MST), models. Mod
阅读全文