I have this error when I write a block scope function.
Failed to compile
./src/components/PlaceDetails/PlaceDetails.jsx 110:28 Module parse failed: Unexpected token (110:28) You may need an appropriate loader to handle this file type. | columnNumber: 21 | } }, place.ranking)), place?.cuisine?.map(function (_ref2) { | var name = _ref2.name; | return /#PURE/React.createElement(Chip, {
this is my function: I use Travel Advisor api, 'place' is data from this api. cuisine its array.
{place?.cuisine?.map(({name})=> (
<Chip key ={name} size='small' label={name} className='chip' />
))}
It seems you are using the babel/react scripts versions that are not supporting Optional chaining (?). Make sure that you have the following versions installed.