I have started learning react-native and When i am following different tutorials on net, some are using Ecma6 and other are without it. Most of the places I have read that we have a choice to use either of the syntax. But when I try to create app without ECMA6 it always gives me this error
undefined is not a function evaluating react create class
This is my code :
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
TextInput,
View,
Image,
ListView
} = React;
var MyApp = React.createClass({
......
});
AppRegistry.registerComponent('MyApp', () => MyApp);
Am I missing something or is it not possible to use code without ECMA6 in new version of react native I am using version 0.27