I have this codes:
var React = require('react-native');
var {
AppRegistry,
MapView,
View,
StyleSheet
} = React;
var Weather = React.createClass({
render: function(){
return <MapView style={styles.map}></MapView>
}
});
const styles = StyleSheet.create({
map: {
flex: 1,
}
});
AppRegistry.registerComponent('Weather', () => Weather);
I just want to test the map, however, when I run it, I got the error:
Seems you're trying to access 'react-native' package. Perhaps you meant to access 'React.createClass' from the 'react' package instead ?
I don' t see what's wrong with the above codes, can you help me out
Thanks