I want to write the equivalent in react:
if (this.props.conditionA) { Condition A } else if (this.props.conditionB) {
Indeed, that is not the way.
var element; if (this.props.conditionA) { element = (Condition A) } else if (this.props.conditionB) { element = (Condition B) } else { element = (Neither) } ... {element}