title: ReactJs trying to create a filter list
body: <p>I am trying to create an filter list which filter the list on typed input. But don't know why the if statement is not working.</p>
  
  <p>Here is the function I wrote: `</p>
  
  <pre><code>filterList (event) {
      var updatedList = this.props.array; 
      var filterText = this.state.text;
      updatedList = updatedList.filter(function(item){
        console.log(filterText);
        if(item.name === filterText){
          console.log('check', item.name);
        }
      });
  </code></pre>
  
  <p>Can someone help me out on this here is a link to my codepen: <a href="http://codepen.io/smgjrein/pen/ALbVyo" rel="nofollow">LINK</a></p>