I am simply trying to use an if/else statement in React in some JSX, but I get a "Parsing error: Unexpected token". The example ternary statement seems to work fine. Can you not use if/else statements in JSX?
./src/App.js
Line 288: Parsing error: Unexpected token
286 | { this.getInvitesForEvent(dat.id,
this.invitesForEventData) }
287 | { true === 1 ? 'empty set' : 'has results' }
> 288 | { if (true) { true } else { false } }
| ^
289 | </div>
290 | ))
291 | }