这句代码看不懂,谁能解释一下
 发布于 10 年前  作者 chenxiaohu  5504 次预览  最后一次回复是 10 年前  来自 问答 

const { todos, actions } = this.props

这是Redux的todomvc示例中的代码

具体代码位置 请点击

3 回复
TossShinHwa
const todos = this.props.todos;
const actions = this.props.actions;

建议你先看看 ES6 入门.

chenxiaohu

谢谢!

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