CNode

这句代码看不懂,谁能解释一下

问答
Cchenxiaohu发布于11 年前最后回复11 年前3 回复5681 浏览0 收藏

const { todos, actions } = this.props

这是Redux的todomvc示例中的代码

具体代码位置 请点击

查看回复

回复 (3)

T
TossShinHwa#1·11 年前
const todos = this.props.todos;
const actions = this.props.actions;

建议你先看看 ES6 入门.

Y
yuyang041060120#2·11 年前
C
chenxiaohu#3·11 年前

谢谢!

明白了,代码的作用我能猜出来,就是不知道叫 “destructuring” :(

参与回复
登录后即可参与回复。登录