How to fix Eslint error “prefer-destructuring”?

前端 未结 3 1554
悲&欢浪女
悲&欢浪女 2020-12-08 18:57

I wanted to shorten an object literal in ES6 like this:

const loc = this.props.local;

The reason is loc.foo(); is a lot easier

3条回答
提交回复
热议问题