I have that error:
SyntaxError Unexpected token, expected ",")
Code:
render() {
const {collections} = this.state;
return (
<div className='shop-page'>
{
collections.map({id, ...otherCollectionProps} => {
<PreviewCollection key={id} {...otherCollectionProps}/>
})
}
</div>
)
}
See Question&Answers more detail:os