Skip to content

Commit

Permalink
Deprecation warning for AsyncStorage (#23384)
Browse files Browse the repository at this point in the history
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: #23384

Differential Revision: D14025255

Pulled By: cpojer

fbshipit-source-id: 5cabd76c650126ed77dfb8b714e05980c4d0b6da
  • Loading branch information
Krzysztof Borowy authored and facebook-github-bot committed Feb 11, 2019
1 parent 1a26f97 commit ffe3748
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Libraries/react-native/react-native-implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit ffe3748

Please sign in to comment.