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
loc.foo();
change your code from:
const local = this.props.local;
to:
const { local } = this.props;
They are equivalent and you can call local.foo() in the same way. except that the second use object destructuring.
local.foo()