I returned to new JS after a decade and trying to learn new syntax.
I don't know what is wrong with syntax:
const images = this.props.update.imageUrls.map(imageUrl =>
{original:imageUrl,thumbnail:imageUrl} );
It keeps giving error:
UpdateView.js: Unexpected token, expected ; (41:96)
> 41 | const images = this.props.update.imageUrls.map(imageUrl => {original:imageUrl,thumbnail:imageUrl} );
| ^
This old syntax works and does what I want:
const images = this.props.update.imageUrls.map(function(imageUrl,index) {
return {"original":imageUrl,"thumbnail":imageUrl}} );