I am trying to output two return methods in a if-statement in JSX (React). This my code:
render() {
return(
<div>
{this.state.someData &&
this.state.someData.foo == 'test' ? (
this.renderSomething(), //this return method does not display
this.renderSomethingElse()
) : (
this.renderElse()
)
}
</div>
)
}
I am able to display only one return method in my if-statement with jsx syntax. I already googled, but did not find anything.