I'm building a react-native app where i use react-native-maps package to show markers on the map with every region by sending request to my server to get some data
<MapView
followUserLocation
initialRegion={region}
ref={(ref) => { this.mapRef = ref; }}
showsUserLocation
style={styles.map}
onRegionChange={this.onRegionChange.bind(this)}
/>
on RegionChange i send a request to my server
onRegionChange(region) {
// send my request to my server
}
but the user may make many region change in a very short time , how can i make sure that i'll get the correct response (i.e response related to the last region change ) ??