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
This commit is contained in:
parent
1a26f97eb0
commit
ffe37487b2
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue