When I do the following, everything works fine:
this.state.sections.map(({ a, b }) => <MenuItem { ...{a,b} }/>)
However, when I do the following(which I think would be the equivalent, I get an error saying ... is expected:
this.state.sections.map(({ a, b }) => <MenuItem { a, b }/>)
Why so? Isn't ...{a,b} the equivalent of a, b in JS?