You can transfer assignment to parens to reassign variables through destructuring. The reason this is necessary is because otherwise the parser { taken by the parser to start the block, not the object literal or destination pattern. This blog post explains the situation in more detail.
function(oldState, newState) { let {foo, bar} = oldState;
source share