I have problem with react-native when switching views with react-native-router-flux.
mapMarkerGen(){
if(mapMarkersFetched){
_this = this;
return mapMarkers.map(function(marker, i){
return(
<MapView.Marker
key={i}
coordinate={{
longitude: parseFloat(marker.lo),
latitude: parseFloat(marker.la),
}}
onPress={() =>{_this.getMarkerInfo(marker.id, i);}}
title={_this.state.title}
description={_this.state.info}
onCalloutPress={function(){Actions.place({placeID: marker.id});}}
>
</MapView.Marker>
);
});
}
}
After i do switch between views if i click callout and come back i get error _this.getMarkerInfo is not a function
"react": "^16.0.0-alpha.12",
"react-native": "^0.45.1",
"react-native-router-flux": "^3.40.1"