title: setState not updating in function call
body: <p>I've read many posts concerning this issue, something about <code>this.setState</code> being an asynchronous call, so it doesn't re-render every time. How do I approach this problem given the following context:</p>
  
  <pre><code>getInitialState: () -&gt;
      return {
          page: ""
      }
  
  choose: (event) -&gt;
      console.log(@props.id) # This is the correct id that I want to pass into state
      @setState({
          page: @props.id # @state.page isn't being set to @props.id 
      })
  
  render: () -&gt;
      return (
          &lt;button onClick={@choose}&gt;Click me&lt;/button&gt;
      )
  </code></pre>
  
  <p>I've tried to <code>bind</code> the onClick call like <code>onClick={@choose.bind(@)}</code> but it seems that React already does this automatically. How do I properly set the state in <code>choose()</code> after I click on the button?</p>
  
  <p>SOLUTION: this is the child component which is calling a parent component, so the <code>state</code> got lost somewhere in there. All I had to do was to call pass down the <code>id</code> from the parent component as props and access it through there.</p>