Conditional Rendering in React and JSX, the solution

Noel Broda
1 min readFeb 11, 2018

I’m sure that most of us have to deal with the Conditional Rendering in React and JSX.
All the proposals that are going around are decreasing our code readability. For example:

And there are a lot of more options in https://reactjs.org/docs/conditional-rendering.html.

Well, from my point of view, something that I found really acceptable in code readability, that help me a lot to understand the code when reading it, is this approach:

I hope you will find it useful!

--

--