title: using an if statement inside of a map function, but 'this is not binding
body: <p>I get a "Cannot read property 'filter_selected' of undefined" error.
  I tried binding the cards in constructor. And tried it without binding.</p>
  
  <p>The console.log of 'this'  inside the map function returns App, but there is no state property inside of the object returned.</p>
  
  <p>I also tried changing the if statements to ternary operations, but to no avail.</p>
  
  <p>I think it is a scope issue, but can't figure it out.     </p>
  
  <pre><code>class App extends Component {
    constructor(props) {
    super(props);
    this.state = {
      filteredphotoArray: [],
      filter_selected: "all"
    };
    this.cards = this.cards.bind(this);
  }
  
  cards = data.map((card, i, imgArr) =&gt; {
    console.log(this); //App, but no state property in App
    if (this.state.filter_selected === "all") {
      return data;
    } else if (card.filter === this.state.filter_selected) {
      return card;
    } 
  });
  </code></pre>