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