Mobx中的api如何既是方法调用又是装饰方法?

问题描述 投票:0回答:1

Mobx中的API如何成为常用的方法调用和装饰方法?如可观察的。是否使用duck类型来检测调用API时传递的参数?

javascript decorator mobx
1个回答
0
投票

使用observable(value)@observable classProperty = value并不相同。第一个是从MobX导出的方法调用,第二个是extendObservable(this, { property: value })的语法糖。他们不一样。

© www.soinside.com 2019 - 2024. All rights reserved.