title: What does bind do in this react example?
body: <p>What does <strong>bind</strong> do in this statement <strong>this.tick.bind(this)</strong> in the following code:</p>
  
  <pre><code>export class Counter extends React.Component {
    constructor(props) {
      super(props);
      this.state = {count: props.initialCount};
    }
    tick() {
      this.setState({count: this.state.count + 1});
    }
    render() {
      return (
        &lt;div onClick={this.tick.bind(this)}&gt;
          Clicks: {this.state.count}
        &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p>The code is taken from the <a href="https://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html" rel="noreferrer">React</a> site.</p>