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.
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.