const { todos, actions } = this.props
这是Redux的todomvc示例中的代码
具体代码位置 请点击
const todos = this.props.todos; const actions = this.props.actions;
建议你先看看 ES6 入门.
ES6 的 destructuring
谢谢!
明白了,代码的作用我能猜出来,就是不知道叫 “destructuring” :(
CNode 社区为国内最专业的 Node.js 开源技术社区,致力于 Node.js 的技术研究。
建议你先看看 ES6 入门.
ES6 的 destructuring
谢谢!
明白了,代码的作用我能猜出来,就是不知道叫 “destructuring” :(