i am new to javasacript. Besides, I am developing an application with React. I am getting a parsing error today. probably a punctuation error. but I couldn't find where. can you help me ?
export const CategorySuite = ({items}) => {
return (
{items.map(item => <Item item={item}/>)}
);
};
Error =>
13 |
14 | return (
> 15 | {items.map(item => <Item item={item}/>)}
| ^
16 |
17 | );
18 | };
If you're not returning JSX, you can't use the outer parentheses. Should be just:
return items.map(...)