title: React check the elements of an array for a conditional display
body: <p>I would like to check if the value of my element appears in
  an array if it is the case I give it the class
  another class.</p>
  
  <p>this is to make a map from another object array</p>
  
  <p>How to check in the whole table if
  Is there the value I want?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"&gt;&lt;/script&gt;
    
    
    class Dbz extends React.Component {
    
       constructor(props) { 
             super(props)
             
             This.state = {
             
                sayien = ['goku','vegeta','broly']
                warrioz = [
                            { name:goku
                              power: 1500
                              },
                           { name: yamcha
                              power: 150
                              },
                           { name: cell
                              power: 2500
                              },
                           ]
            
             }
       }
       
     
       render(){
       
           return(
        
  
       &lt;div&gt;   
         { this.state.warrioz.map((data) =&gt; {
   
            return (  
           &lt;div className={this.state.sayien === data.name ? "sayien" :"nosayien"}&gt;
              &lt;p&gt;{data.name} &lt;/p&gt;
           &lt;/div&gt;
              })}
  
       &lt;/div&gt;
           
           )
          
       }
    
    
    
         }
         
         
     export default Dbz</code></pre>
  </div>
  </div>
  </p>