React | Conditional Rendering | Question 2

Last Updated :
Discuss
Comments

What does the following code do in React?

JavaScript
{isLoggedIn && <Dashboard />}

It will always render <Dashboard />

It will render <Dashboard /> only if isLoggedIn is true

It will never render <Dashboard />

It will display an error

Share your thoughts in the comments