【问题标题】:Es lint prefer destructuringEslint 更喜欢解构 【发布时间】:2018-03-05 10:41:10 【问题描述】: 我不知道如何使用es6对象解构来存储数组的长度: const length = this.props.options.length; 【问题讨论】: /es6-how-to-destructure-from-an-object-可能重复 检查这个stackoverflow.com/questions/42595907/…会很有帮助 标签: reactjs eslint 【解决方案1】: 语法是这样的: const { length } = this.props.options 【讨论】: