I\'ve read in the React docs that \"if\" type statements can\'t be used in JSX code, because of the way JSX renders into javascript, it doesn\'t work out as one would expect
I would try to avoid conditional rendering with "templates" altogether. In React and JSX you can use the full set of JavaScript functionality to make conditional rendering happen:
That's what makes the rendering with JSX so powerful. Otherwise one could invent again own templating languages that are library/framework specific like in Angular 1/2.