要想知道MobX是什么,首先需要了解一下FRP是什么,FRP 的本质是,在声明一个值的时候,同时指定他的动态行为。这个值可能是事件,也可能是数据。 FRP 有两个重要的分支:
接下来介绍一下Mobx 和 其他实现有什么不同:
Map
is not defined, #779 by @dirtyrolfSymbol.toPrimitive()
and valueOf()
, see #773 by @eladnava #GoodnessSquadstruct
option to reaction
(alias for compareStructural
, to get more consistency in naming)observable.struct
, as alias for observable.deep.struct
observable.deep.struct
: Only stores a new value and notify observers if the new value is not structurally the same as the previous value. Beware of cycles! Converts new values automatically to observables (like observable.deep
)observable.ref.struct
: Only stores a new value and notify observers if the new value is not structurally the same as the previous value. Beware of cycles! Doesn't convert the new value into observables.extras.deepEquals
: Check if two data structures are deeply equal. supports observable and non observable data structures.本站原创,转载时保留以下信息:
本文转自:深度开源(open-open.com)
原文地址:http://www.open-open.com/news/view/40f570ed