how to display a div with multiple conditions in reactjs

I am trying to display a div according to some condition but it is not working properly.
i have some user like admin and visitor and some more profile, and there is one more condition associated with admin let take that condition isBusy(boolean).

i want to display particular div only for admin and visitor. and for admin when isBusy is true
here is my code-

{(user.isAdmin() && this.props.isBusy) || user.isVisitor() &&
<div>
some more code
</div>
}

i want to show this div when user is admin and isBusy = true or user is visitor.
these conditions are not working properly.

Thanks in advance

108 thoughts on “how to display a div with multiple conditions in reactjs”

Leave a Comment