Using the &&
operator is a quick and easy way to conditionally render a component. Unlike using an if/else
statement, a switch
statement, or the ternary operator, using &&
doesn’t provide a way to choose between 2 or more components to render.