From ffe37487b228b77a3697c32767e91f1dd68041d8 Mon Sep 17 00:00:00 2001 From: Krzysztof Borowy Date: Mon, 11 Feb 2019 13:29:30 -0800 Subject: [PATCH] Deprecation warning for AsyncStorage (#23384) Summary: Added a deprecation warning for the `Async Storage`, module as part of #23313. [General] [Deprecated] - Async Storage [was moved to community repo](https://github.com/react-native-community/react-native-async-storage) Pull Request resolved: https://github.com/facebook/react-native/pull/23384 Differential Revision: D14025255 Pulled By: cpojer fbshipit-source-id: 5cabd76c650126ed77dfb8b714e05980c4d0b6da --- 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 849b7f066..f4fc0b88c 100644 --- a/Libraries/react-native/react-native-implementation.js +++ b/Libraries/react-native/react-native-implementation.js @@ -192,6 +192,12 @@ module.exports = { return require('AppState'); }, get AsyncStorage() { + warnOnce( + 'async-storage-moved', + 'Async Storage 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/async-storage' instead of 'react-native'. " + + 'See https://github.com/react-native-community/react-native-async-storage', + ); return require('AsyncStorage'); }, get BackHandler() {