© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Alan Flood
Web Developer
Nothing wrong with either way but React's docs even point to use the && operator for conditional 'if' rendering.
facebook.github.io/react/docs/conditional-renderi…
and it's less code!