title: Using an if/else inside react render return
body: <p>I have this javascript inside my react render:</p>
  
  <pre><code>  &lt;p id='canPlay'&gt;
            {this.state.canPlayArray.map(function(num, index){
              return &lt;p key={ index }&gt;Name: {num.name} Date Indicated: {num.dateConfirmed}&lt;/p&gt;;
            }, this)}
     &lt;/p&gt;
  </code></pre>
  
  <p>However sometimes, <code>canPlayArray</code> may be empty. How can I say if array.length >0 then render the array ELSE display 'no one has responded'</p>
  
  <p>I cant do an if/else inside the html I dont think AND just before the return() I have:</p>
  
  <pre><code>if (this.state.info){
        output = &lt;Thanks /&gt;;
      }
  </code></pre>
  
  <p>which may stop me doing an if/else there?</p>
  
  <p>thinking of using a ternary operator but not sure where to put it</p>