From a5b26decb277f2d4f4597ab023e6ed20f6703f0b Mon Sep 17 00:00:00 2001 From: Matt Oakes Date: Mon, 11 Feb 2019 15:51:09 +0000 Subject: [PATCH 1/3] Add a deprecation warning when importing NetInfo --- Libraries/react-native/react-native-implementation.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Libraries/react-native/react-native-implementation.js b/Libraries/react-native/react-native-implementation.js index 849b7f066bfdc4..892834074b9e4e 100644 --- a/Libraries/react-native/react-native-implementation.js +++ b/Libraries/react-native/react-native-implementation.js @@ -240,6 +240,12 @@ module.exports = { return require('NativeEventEmitter'); }, get NetInfo() { + warnOnce( + 'netinfo-moved', + 'NetInfo has been extracted from react-native core and will be removed in a future release. ' + + "It can now be installed and imported from '@react-native-community/netinfo' instead of 'react-native'. " + + 'See https://github.com/react-native-community/react-native-netinfo for more informations.', + ); return require('NetInfo'); }, get PanResponder() { From e5fe86cf8dc49abb984eccd5d5498b99b448ad91 Mon Sep 17 00:00:00 2001 From: Christoph Nakazawa Date: Mon, 11 Feb 2019 16:07:04 +0000 Subject: [PATCH 2/3] Update react-native-implementation.js --- Libraries/react-native/react-native-implementation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/react-native/react-native-implementation.js b/Libraries/react-native/react-native-implementation.js index 892834074b9e4e..ac083a77836907 100644 --- a/Libraries/react-native/react-native-implementation.js +++ b/Libraries/react-native/react-native-implementation.js @@ -167,7 +167,7 @@ module.exports = { 'webview-moved', 'WebView has been extracted from react-native core and will be removed in a future release. ' + "It can now be installed and imported from 'react-native-webview' instead of 'react-native'. " + - 'See https://github.com/react-native-community/react-native-webview for more informations.', + 'See https://github.com/react-native-community/react-native-webview', ); return require('WebView'); }, From b8080909818e406ba8eda4af51806b23f4e9a975 Mon Sep 17 00:00:00 2001 From: Christoph Nakazawa Date: Mon, 11 Feb 2019 16:07:29 +0000 Subject: [PATCH 3/3] Update react-native-implementation.js --- Libraries/react-native/react-native-implementation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/react-native/react-native-implementation.js b/Libraries/react-native/react-native-implementation.js index ac083a77836907..530f5e02c47cc5 100644 --- a/Libraries/react-native/react-native-implementation.js +++ b/Libraries/react-native/react-native-implementation.js @@ -244,7 +244,7 @@ module.exports = { 'netinfo-moved', 'NetInfo has been extracted from react-native core and will be removed in a future release. ' + "It can now be installed and imported from '@react-native-community/netinfo' instead of 'react-native'. " + - 'See https://github.com/react-native-community/react-native-netinfo for more informations.', + 'See https://github.com/react-native-community/react-native-netinfo', ); return require('NetInfo'); },