If / else statement inside of React Component’s Render method

Sometimes (well, actually pretty often) you have to use conditional statements inside of React Component’s Render methods. You could do it like this: import React from „react“; class MyComponent extends React.Component { render() { return ( <di> {„LGK“ == „awesome“ ? <h1>LGK is awesome!</h1> : <h1>LGK is not awesome :C</h1> } </div> ); } }… If / else statement inside of React Component’s Render method weiterlesen