title: How to use ternary operator in return statement that returns an array
body: <p>I use React 16.0.</p>
  
  <p>I want to return an element conditionally as shown below.</p>
  
  <pre><code>import React from 'react';
  
  export default class App extends React.PureComponent {
      render () {
          return [
              &lt;div className="a"&gt;&lt;/div&gt;,
              {condition ? &lt;div className="b"&gt;&lt;/div&gt; : null},
              {condition ? &lt;div className="c"&gt;&lt;/div&gt; : null}
          ];
      }
  }
  </code></pre>
  
  <p>Is there a way to do this without any extra methods or conditional statements outside the return statement?</p>
  
  <p>thank you for reading.</p>