Can't find variable: React
<p>I am trying to make a simple iOS page with a button that triggers an action.
I have followed the tutorial on how to get started and this is my index code:</p>
<pre><code>'use strict';
var React = require('react-native');
var {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  TouchableHighlight,
  Component,
  AlertIOS // Thanks Kent!
} = React;

class myProj extends Component {
 render() {
    return (
      &lt;View style={styles.container}&gt;
        &lt;Text&gt;
          Welcome to React Native!
        &lt;/Text&gt;
        &lt;TouchableHighlight style={styles.button}
            onPress={this.showAlert}&gt;
            &lt;Text style={styles.buttonText}&gt;Go&lt;/Text&gt;
          &lt;/TouchableHighlight&gt;
      &lt;/View&gt;
    );
  }
 
  showAlert() {
    AlertIOS.alert('Awesome Alert', 'This is my first React Native alert.', [{text: 'Thanks'}] )
  }
}

var styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#FFFFFF'
  },
  buttonText: {
    fontSize: 18,
    color: 'white',
    alignSelf: 'center'
  },
  button: {
    height: 44,
    flexDirection: 'row',
    backgroundColor: '#48BBEC',
    alignSelf: 'stretch',
    justifyContent: 'center'
  }
});

AppRegistry.registerComponent('myProj', () =&gt; myProj);
</code></pre>
<p>The problem is that when I run it from Xcode on my device I get</p>
<pre><code>Can't find variable: React
render
main.jsbundle:1509:6
mountComponent
mountChildren
</code></pre>
<p>Any idea what might be the problem here?</p>