随笔分类 -  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 阅读全文
posted @ 2018-02-01 02:14 Zhentiw 阅读(440) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-31 02:56 Zhentiw 阅读(231) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-30 03:40 Zhentiw 阅读(175) 评论(0) 推荐(0) 编辑
摘要:In real life scenarios, many operations on our data are asynchronous. For example, because additional recourses need to get fetched. MST has first cla 阅读全文
posted @ 2018-01-28 23:15 Zhentiw 阅读(164) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-28 22:55 Zhentiw 阅读(123) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-28 22:47 Zhentiw 阅读(318) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-28 22:35 Zhentiw 阅读(234) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-28 03:37 Zhentiw 阅读(226) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-28 02:21 Zhentiw 阅读(618) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-24 22:07 Zhentiw 阅读(165) 评论(0) 推荐(0) 编辑
摘要:Testing models is straightforward. Especially because MST provides powerful tools to track exactly how your state changes over time. Track snapshots, 阅读全文
posted @ 2018-01-23 21:20 Zhentiw 阅读(938) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-23 20:18 Zhentiw 阅读(343) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-23 19:48 Zhentiw 阅读(284) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示