Which of the following is the correct way to conditionally render a component in React without rendering false or null to the DOM?
{condition && <MyComponent />}
{condition ? <MyComponent /> : null}
{condition && condition}
{condition || <MyComponent />}
This question is part of this quiz :
Conditional Rendering In React