title: TypeError: _this.props.selectFlat is not a function
body: <p>I try to use to use the function "selectFlat" to update the "lng" and "lat" of the selectedFlat. So i transfered the function by a props. </p>
  
  <p>In the class Flat, I use handleClick function, to trigger this function i get this error.</p>
  
  <p>If someone have an advice that would be amazing ! :)</p>
  
  <pre><code>import React, { Component } from 'react';
  import flats from './flats';
  import ListFlats from './list-flat';
  import Flat from './flat';
  import MapA from './map';
  
  
  class App extends Component {
    constructor(props) {
      super(props);
  
      this.state = ({
        listFlats: flats,
  
        selectedFlat: {
          lng: 48.884211,
          lat: 2.34689
        }
      });
    }
  
    selectFlat = (lng, lat) =&gt; {
      this.setState({ selectedFlat: { lng: lng, lat: lat } });
    }
  
    render() {
      return (
        &lt;div&gt;
          &lt;div className="flat-list"&gt;
            &lt;ListFlats listFlats={this.state.listFlats} selectFlat={this.selectFlat} /&gt;
          &lt;/div&gt;
          &lt;div className="map-container"&gt;
            &lt;MapA selectedFlat={this.state.selectedFlat} /&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      );
    }
  }
  
  export default App;
  ```
  
  ```
  import React, { Component } from 'react';
  
  class Flat extends Component {
    handleClick = () =&gt; {
      this.props.selectFlat(this.props.lng, this.props.lat);
    }
  
    render() {
      return (
        &lt;div className="card" style={{ backgroundImage: `url(${this.props.imageUrl})`}}
          onClick={this.handleClick} onKeyDown={this.handleClick}
        &gt;
          &lt;div className="card-category"&gt;{this.props.price}&lt;/div&gt;
          &lt;div className="card-description"&gt;
            &lt;h2&gt;{this.props.name}&lt;/h2&gt;
          &lt;/div&gt;
          &lt;a className="card-link" href="#"&gt;&lt;/a&gt;
        &lt;/div&gt;
      );
    }
  }
  
  export default Flat;
  ```
  
  </code></pre>