title: React - State not updated
body: <p>Here I try to set <code>state.autocomplete</code> to 'hello' and then print it, but state seems to be null. How can that be when I just updated the state using <code>setState</code>? <code>data</code> is set as a global variable.</p>
  
  <pre><code>  var data = {
      populate_at: ['web_start', 'web_end'],
      autocomplete_from: ['customer_name', 'customer_address']
    };
  
  
    var AutocompleteFromCheckboxes = React.createClass({
      handleChange: function(e) {
        this.setState( { autocomplete_from: 'event.target.value' } );
        console.log('autocompleteFrom state: ', this.state.autocomplete_from);
        // ^  =&gt; Uncaught TypeError: Cannot read property 'autocomplete_from' of null
        return 1;
      },
      render: function() {
        var autocompleteFrom = this.props.autocomplete_from.map(function(value) {
          return (
            &lt;label for={value}&gt;
              &lt;input type="checkbox" name={value} value="{value}"
                onChange={this.handleChange.bind(this)}
                ref="autocomplete-from"/&gt;
              {value}
            &lt;/label&gt;
          );
        }, this);
        return (
          &lt;div className="autocomplete-from"&gt;
            {autocompleteFrom}
          &lt;/div&gt;
        );
      }
    });
  
    var DynamicForm = React.createClass({
      getInitialState: function() {
        return {
          name              : null,
          populate_at       : null,
          same_as           : null,
          autocomplete_from : "not set",
          title             : null
        };
      },
      saveAndContinue: function(e) {
        e.preventDefault();
        var data = {
          name     : this.refs.name.getDOMNode().value,
        };
        console.log('data: ' + data.name);
      },
  
      render: function() {
        return (
            &lt;AutocompleteFromCheckboxes
              autocomplete_from={this.props.data.autocomplete_from} /&gt;
        );
      }
    });
  
  
    var mountpoint = document.getElementById('dynamic-form');
    if ( mountpoint ) {
      React.render(&lt;DynamicForm data={data} /&gt;, mountpoint);
    }
  
  });
  </code></pre>