DEV Community

Discussion on: A Clean Way to Conditionally Render Components

Collapse
 
cyrstron profile image
cyrstron • Edited

IMO, the best way of doing that is this pattern

    condition && (
        <Component />
    )
Enter fullscreen mode Exit fullscreen mode

Much more concise, decently readable and short circuit saves some resources and possible runtime errors with not evaluating jsx.