title: How to change login button to logout button in React
body: <p>Hi I'm building a single page app using react.js for the first time, I'm struggling really badly with syntax here. I simply want to change the login button to a logout button when the user has signed in. Where am I going wrong?</p>
  
  <pre><code>render() {
    const isLoggedIn = this.state.isLoggedIn;
  
    return (
      if (isLoggedIn) {
        &lt;div className="authentication"&gt;
          &lt;button&gt;Logout&lt;/button&gt;
        &lt;/div&gt;
      } else {
        &lt;a href='http://localhost:8888'&gt;
          &lt;button&gt;Login&lt;/button&gt;
        &lt;/a&gt;
      }
    );
  }
  </code></pre>