title: Getting Expected an assignment or function call and instead saw an expression no-unused-expressions error when trying to render a component in React
body: <p>I am trying to render <code>Card</code> component based on the number of items in the <code>items</code> object but I am getting the error on line 6.</p>
  
  <pre><code>import React from "react";
      export class Cards extends React.Component {
        render() {
          let elements = [];
          elements = this.props.items.map(item =&gt; {
            &lt;Card titles = {item.title} imgsrc = {item.urlToImage}
            discr = {item.description} urls = {item.url}
            /&gt;
          })
          return (
            {elements}
          );
        }
      }
  </code></pre>
  
  <p>And this is the <code>Card</code> component :</p>
  
  <pre><code>import React from 'react'
  export default ({titles, imgsrc, urls, discr}) =&gt; {
    return (
      &lt;div className="cards"&gt;
          &lt;div className="card"&gt;
            &lt;div className="cardHead"&gt;
              &lt;h4&gt;{titles}&lt;/h4&gt;
            &lt;/div&gt;
            &lt;div className="cardBody"&gt;
              &lt;img src={imgsrc} alt="pst-img" /&gt;
            &lt;/div&gt;
            &lt;div className="cardFooter"&gt;
              &lt;p&gt;{discr}&lt;/p&gt;
              &lt;a className="buttn" href={urls}&gt;
                &lt;button&gt;Read More&lt;/button&gt;
              &lt;/a&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      )
   }
  </code></pre>