nitaliano / react-native-mapbox-gl

A Mapbox GL react native module for creating custom maps
Other
2.16k stars 697 forks source link

onRegionDidChange not called when used in function component #1588

Closed parkdcom closed 5 years ago

parkdcom commented 5 years ago

I have noticed that the onRegionDidChange is not called when I use the MapView in a function component. If I use it inside the render of a class component it seems to get called.

The same problem happens with onRegionWillChange but not with onRegionIsChanging.

I have tried it on the latest master branch and version 3.1.2