score:1

Accepted answer
{link ? (
  <a href={link}>
    <h2>Link Content</h2>
  </a>
) : <h2>Link Content</h2>}

score:0

render () {
 return (
    <div className="row">
      { //Check if message failed
        (this.state.message === 'failed')
          ? <div> Something went wrong </div> 
          : <div> Everything in the world is fine </div> 
      }
    </div>
  );
}

Related Query

More Query from same tag