【发布时间】:2018-12-02 15:24:05
【问题描述】:
我知道这可能是一个非常基本的问题,但我不精通 ES6,而且我遇到过这种语法:
const { rootStore: { routerStore } } = this.props;
我明白这样的意思是什么:
const { rootStore } = this.props;
(从this.props 中的属性rootStore 创建一个常量rootStore)。
但是上面的双重解构(我假设是解构)是什么意思呢?
【问题讨论】:
-
这叫解构,不是解构。
-
@Bergi - 糟糕,已修复。谢谢。
标签: javascript ecmascript-6 destructuring