title: Pass additional parameters to bind?
body: <p>I have two functions that look like this:</p>
  
  <pre><code>  primaryImageLoaded () {
      this.setState({primaryImageLoaded: true})
    }
  
    secondaryImageLoaded () {
      this.setState({ secondaryImageLoaded: true })
    }
  </code></pre>
  
  <p>They are called like this(using react):</p>
  
  <pre><code>onLoad={this.secondaryImageLoaded.bind(this)
  </code></pre>
  
  <p>This feels excessive and I would like to have just one function and pass the state-variable as a parameter, but how can I pass an additional argument to <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind" rel="noreferrer"><code>.bind</code></a>? and is it possible to use a variable as key in the object i'm passing to <code>setState</code>?</p>