From 8b3fe666aaee39707e5934e02f3cc0a81d20de4e Mon Sep 17 00:00:00 2001 From: Martin Konicek Date: Mon, 21 Nov 2016 15:00:00 +0000 Subject: [PATCH] Add deprecation warning to MapView --- Libraries/Components/MapView/MapView.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Libraries/Components/MapView/MapView.js b/Libraries/Components/MapView/MapView.js index 3791207e06d..0b3e9abd19a 100644 --- a/Libraries/Components/MapView/MapView.js +++ b/Libraries/Components/MapView/MapView.js @@ -86,6 +86,19 @@ export type AnnotationDragState = $Enum<{ const MapView = React.createClass({ + componentWillMount: function() { + console.warn( + 'MapView is now deprecated and will be removed from React Native in version 0.42. ' + + 'Please use the react-native-maps module which is more feature complete ' + + 'and works on Android too: https://github.com/airbnb/react-native-maps\n' + + 'It is actively maintained and widely used.\n\n' + + 'Once MapView is removed from React Native in v0.42, we will release the ' + + 'code as deprecated-react-native-ios-mapview. You will be able to ' + + 'continue using that and migrate to react-native-maps your own pace later.\n\n' + + 'For more info, check out https://github.com/facebook/react-native/pull/10500' + ); + }, + mixins: [NativeMethodsMixin], propTypes: {