React | Conditional Rendering | Question 3

Last Updated :
Discuss
Comments

Why can {count && <p>{count}</p>} behave unexpectedly when count = 0?

It throws an error

It still renders 0

It doesn’t render anything

It duplicates the element

Share your thoughts in the comments