Having a slight issue with some code that I have written, I keep getting the error:
expected an assignment or function call and instead saw an expression
I have commented where the error is happening. Not sure what the issue is however. Code is as follows:
renderBody() {
const { bookings } = this.props;
if (bookings.length > 0) {
return (
Object.keys(bookings).map(e => (
<TableBody>
{Object.values(bookings[e]).forEach((value) => {
<TableCell>{value}</TableCell>; //<-ERROR??
})}
</TableBody>
))
);
}
return null;
}
[<>]
toolbar button). Stack Snippets support React, including JSX; here's how to do one. - T.J. Crowderconst {bookings}
- Jonas Wilms