-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecation warning for AsyncStorage #23384
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code analysis results:
eslint
found some issues.
@@ -192,6 +192,12 @@ module.exports = { | |||
return require('AppState'); | |||
}, | |||
get AsyncStorage() { | |||
warnOnce( | |||
"async-storage-moved", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettier/prettier: Replace "async-storage-moved"
with 'async-storage-moved'
@@ -192,6 +192,12 @@ module.exports = { | |||
return require('AppState'); | |||
}, | |||
get AsyncStorage() { | |||
warnOnce( | |||
"async-storage-moved", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quotes: Strings must use singlequote.
@@ -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. " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettier/prettier: Replace "Async·Storage·has·been·extracted·from·react-native·core·and·will·be·removed·in·a·future·release.·"
with 'Async·Storage·has·been·extracted·from·react-native·core·and·will·be·removed·in·a·future·release.·'
@@ -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. " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quotes: Strings must use singlequote.
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'. " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettier/prettier: Insert ··
"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 for more informations.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettier/prettier: Replace "See·https://github.com/react-native-community/react-native-async-storage·for·more·informations."
with ··'See·https://github.com/react-native-community/react-native-async-storage·for·more·informations.'
"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 for more informations.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quotes: Strings must use singlequote.
0c14969
to
9967baa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary
Added a deprecation warning for the
Async Storage
, module as part of #23313.Changelog
[General] [Deprecated] - Async Storage was moved to community repo
Test Plan
RNTester will display a warning when importing
AsyncStorage