title: React 0.13 class method undefined
body: <p>So i've started with React and ES6 and got stuck with very basics. Really appreciate some help.</p>
  
  <p>handleClick() throws an error:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'handleClick' of undefined
  </code></pre>
  
  <p>code follows</p>
  
  <pre><code>export default class MenuItems extends React.Component {
  
    constructor(props) {
      super(props)
      this.state = {active: false}
      this.handleClick = this.handleClick.bind(this)
    }
  
    handleClick() {
      this.setState({ active: !this.state.active });
    }
  
    render() {
      let active = this.state.active
      let menuItems = [{text: 'Logo'}, {text:  'promo'}, {text:     'benefits'}, { text: 'form'}]
      return (
        &lt;ul&gt;
          {menuItems.map(function(item) {
            return &lt;li className={active ? 'active' : ''} onClick={this.handleClick.bind(this)} key={item.id}&gt;{item.text}&lt;/li&gt;;
          })}
        &lt;/ul&gt;
      );
    }
  }
  </code></pre>