DEV Community

Discussion on: 4 Ways to Render JSX Conditionally in React

 
miketalbot profile image
Mike Talbot ⭐ • Edited

<></> is a Fragment not a <div></div>, so nothing apart from the content is rendered.

Thread Thread
 
moopet profile image
Ben Sinclair

Ah, OP has updated the post. It used to use <div> in all the examples.

Thread Thread
 
miketalbot profile image
Mike Talbot ⭐

Ahhh!!! That explains a lot :)