DEV Community

Discussion on: Beginner's experience with React - a shout for feedback

Collapse
 
sergiodxa profile image
Sergio Daniel Xalambrí

Is this the proper way to do conditional rendering? Looks off to me but works just fine!

There are multiple ways, I wrote an article about this sergiodxa.com/articles/react-condi... and the React docs has a section about this topic reactjs.org/docs/conditional-rende....

The tl;dr off there is no single way, use any JS way to handle conditions.