title: React bind in constructor, how to pass parameters to props
body: <p>I am trying to convert my React classes to ES6, but I am having some difficulty within this process.. I would like to have my bindings in the constructor, not in the render view. </p>
  
  <p>Now, if I have a root module with a setState which needs a parameter, e.g.:</p>
  
  <pre><code>constructor() {
      super();
  
      this.state = {
          mood: ""
      };
  
      this.updateMood(value) = this.updateMood.bind(this,value);
  }
  
  updateMood(value) {
      this.setState({mood: value});
  }
  </code></pre>
  
  <p>Then I pass this function to a component:</p>
  
  <pre><code>&lt;customElement updateMood={this.updateMood}&gt;&lt;/customElement&gt;
  </code></pre>
  
  <p>Then within the customElement module, I have something like this:</p>
  
  <pre><code>constructor() {
      super();
  }
  
  update(e) {
      this.props.updateMood(e.target.value);
  }
  </code></pre>
  
  <p>and in the render:</p>
  
  <pre><code>&lt;input onChange={this.update} /&gt;
  </code></pre>
  
  <p>Is this the correct way? Since I can't get it to work ;-(</p>