IF statement in React

A very quick example of an if statement in React.

In App.js

function App() {
  
  // Boolean
  const x = true

  return (
    <div className="container">
      <h1>Hello from react</h1>

      {/* If x is true output 'Yes', else output 'No' */}
      {x ? 'Yes' : 'No'}
      
    </div>
  );
}

export default App;