title: check if element exists in state array
body: <p>How could I access to the element in state array for example</p>
  
  <pre><code>this.state = {
      items: [1,5,22,6],
  }
  </code></pre>
  
  <p>here I'm trying to set up a class if the id exists in items state</p>
  
  <pre><code>{this.props.data.map((row)=&gt; (
   &lt;ul&gt;
    &lt;li key={row.id} className={row.id === this.state.items ? 'complete' : 'pending'}" &gt;{row.name}&lt;/li&gt;
  &lt;/ul&gt;
  
  ))}
  </code></pre>