title: React JS class component const = with multiple conditions
body: <p>I would like to return different buttons depending on what conditions are met.
  This is in react js class component.</p>
  <p>I would like to achieve this:</p>
  <pre><code>
  if (credentials.username === username) {
  
  if paused === false {
   &lt;MyButton
   tip=&quot;Pause Job&quot;
   onClick={this.handlePause}
   &gt;
  Pause
   &lt;/MyButton&gt; 
  
  
  } else {
  
  
   &lt;MyButton
   tip=&quot;Un Pause Job&quot;
   onClick={this.handleUnPause}
   &gt;
  Unpause
   &lt;/MyButton&gt; 
  
  }
  } else { //credentials.username is not equal to  username show null
  null
  }
  </code></pre>