67
rated 0 times
[
74]
[
7]
/ answers: 1 / hits: 57970
/ 9 Years ago, tue, september 1, 2015, 12:00:00
Hi this is my first time developing apps in javascript and react-native, its kind of a noob question. How do I call _getData
function in __onRegionChangeComplete
function? I tried this._getData()
it shows
error: undefined is not a function(evaluation'this._getData()')').
var React = require('react-native');
var {
StyleSheet,
Text,
View,
Image,
MapView,
Component,
} = React;
class Map extends Component {
render() {
return (
<View style={styles.container}>
<MapView style={styles.map}
showsUserLocation={true}
onRegionChangeComplete={this._onRegionChangeComplete}
/>
</View>
);
}
_onRegionChangeComplete(region)
{
}
_getData()
{
}
}
var styles = StyleSheet.create({
container:{
flex: 1
},
map: {
flex: 1,
},
image: {
width: 64,
height: 64
}
});
module.exports = Map;
More From » react-native