title: React-Native this.setState() is not working
body: <p>I am unable to get react-native's <code>this.setState();</code> to work. </p>
  
  <p>When I run the <code>onUpdate</code> method, I can see the correct JSON object being returned. </p>
  
  <p>The issue is when the <code>setState</code> function is called nothing happens and the method fails. No more code is executed below it. It also not re-render the component after the <code>setState</code> function. </p>
  
  <p>Here is my component code below:</p>
  
  <pre class="lang-js prettyprint-override"><code>var App = React.createClass({
  
    getInitialState: function() {
      return {
        view: Login,
        menu: false,
      }
    },
  
    componentDidMount: function() {
      var self = this;
    },
  
    onUpdate: function(val){
      // val is verified as an object here when I log to console
      this.setState(val);
      // nothing runs here. The above line errors out the function
    },
  
    render: function () {
      if(this.state.view == 'Home'){
        this.refs.sideMenu.frontView = Home;
        return (
          &lt;View style={styles.container} &gt;
            {sideMenu}
          &lt;/View&gt;
        );
      }
      return (
        &lt;View style={styles.container} &gt;
          &lt;Login onUpdate={this.onUpdate} /&gt;
        &lt;/View&gt;
      );
    }
  });
  </code></pre>