I am creating a react project and I can not do multiple conditions when displaying My component has a state like this: {user valid: "ok" valid2: "ok" }
In the return () I would like to add a condition to display "OK" if valid or valid2 is equal to ok I tried something like this:
<p>
{
this.state.user.valid === "ok" || this.state.user.valid2 === "ok" ? "ok"
: "verify"
}
</p>
But it does not work How to do this please?
thank you in advance
(this.state.user.valid === "ok" || this.state.user.valid2 === "ok") ? "Ok" : "verify"