Skip to content
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

Import @react-native-community/async-storage #8315

Closed
wants to merge 1 commit into from

Conversation

brentvatne
Copy link
Member

@brentvatne brentvatne commented May 15, 2020

Why

React Native 0.62 removes AsyncStorage from core.

How

I didn't yet. I just imported it. Meant to mark this as WIP, my mistake.

TODO

Discussion

I'm not super stoked about having to import this library because we have to customize it so heavily for scoping. I'd rather us write expo-kv-storage based on the kv-storage spec, but I think this is the best move for compatibility with the React Native ecosystem currently (eg: Amplify, redux-persist, and so on).

@github-actions
Copy link
Contributor

Native Component List for this branch is ready

@sjchmiela
Copy link
Contributor

I was terrified for a second there, but it looks like React Native, fortunately, didn't remove AsyncStorage yet (at least in 0.62.2 to which we can upgrade). I verified that by using the pause/resume download demo in FileSystemScreen which uses AsyncStorage under the hood.

const downloadSnapshot = await this.download.pauseAsync();
await AsyncStorage.setItem('pausedDownload', JSON.stringify(downloadSnapshot));
alert('Download paused...');

Thus I will refrain from adding a launch-blocking label to this PR.

@brentvatne
Copy link
Member Author

wow, that's a relief, thank you for verifying that @sjchmiela - i should have looked into it more, i just looked at the reactnative.dev docs and saw it wasn't listed anymore. instead of this pr i'm going to investigate if we can get @react-native-community/async-storage to use our asyncstorage backend when in managed workflow

@brentvatne brentvatne closed this May 22, 2020
@chrisdrackett
Copy link
Contributor

what does this mean for web when (hopefully soon) the upgrade to react-native-web 0.12.x happens?

@brentvatne
Copy link
Member Author

@chrisdrackett
Copy link
Contributor

@brentvatne right, but can I use that with an expo managed app? maybe I'm just confused.

@ide ide deleted the @brent/async-storage branch February 14, 2021 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants