const {} = this.props;的写法es6写法理解

156 阅读1分钟

const {dispatch} = this.props;

这段代码你可以认为是这样:

const dispatch = this.props.dispatch;

那样写是 ES6 的简写形式。