-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Ract-Native(0.59+) is missing AsyncStorage lib #3209
Comments
Hi @gilador Thank you for the report, we definitively need to discuss how we want to move forward when |
@manueliglesias we get this error even when providing our own storage class, do you know why? |
@Gautierrr I think you are getting a warning (e.g. the yellowbox), is that correct? Once you dismiss it, the app should still work |
It iw a warning but i cant dismiss it, its persistent |
any thoughts? |
@gilador - It's kludgy, but you can disable YellowBox notifications on a per-warning basis: // probably in App.js
import { YellowBox } from 'react-native';
YellowBox.ignoreWarnings([
'Async Storage has been extracted from react-native core and will be removed in a future release.',
]); See the docs for more details. |
10x, but its already disabled |
Should this discussion begin now? What do you think about providing a dependency injection pattern via the configuration? i.e. import MyAsyncStorage from '@react-native-community/async-storage';
Amplify.configure({
...
Dependencies: {
AsyncStorage: MyAsyncStorage, // would default to react-native provided AsyncStorage
},
...
}); This could also make unit testing trivial as a reasonable double could be provided for hard dependencies during test runs. |
@manueliglesias and I are taking a longer look at our storage capabilities right now, including offline features, and will look at this as part of that effort. I don't have an ETA on when we'll have a new recommendation but will look at the suggestions above. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems. |
well I guess we need to open this again,
|
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Describe the bug
while running my react-native app i get this:
it seems amplyfy-js is dependent on a no longer exiting dependencies such as AsyncStorage in react-native-0.59, e:g

node_modules/@aws-amplify/auth/lib/Auth.js:41 -> /node_modules/@aws amplify/core/lib/RNComponents/reactnative.js:18
To Reproduce
Steps to reproduce the behavior:
Expected behavior
the code should not break over missing AsyncStorage
Smartphone:
As i understand you use AsyncStorage as a fall back so i would suggest you to load that lib only if needed.
The text was updated successfully, but these errors were encountered: