-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
AsyncStorage won't be in RN core anymore #1260
Comments
Ideally, wouldn't a web implementation live in https://github.com/react-native-community/react-native-async-storage? |
@SimenB if community is ok for it, I would say clearly YES. |
Does someone want to open an issue in the community repo about moving the implementation there? |
It would be just a copy&paste, but ideally, it would need to be an implementation wrapper of the low level platform dependent native implementation, added to the NativeModules object, so the high level logic is common to all platforms. This way it would be easier it gets merged and maintained upstream. Is that possible. |
I like @piranna's idea. In fact I have just found this issue looking for a way to plug a "native" module for the web, after reading this issue: #470 If we had a standard way to hook our modules into react-native-web, it would be easier to implement (or mock) web versions of many react-native libraries. |
Hey everyone 👋 I'm maintainer of Async Storage on RN community Repo and I love the idea of having support for the web in the same repo. I'm up for doing adding this in upcoming days. Regarding @piranna idea, my long-term plan for the library is to add a functionality similar to Adapter pattern used in Android community, where there's one public facing interface ( |
@krizzu your idea looks nice, it would also allow to change what backend implementation to use :-) |
Hey @piranna, Thank you, and yes, that's exactly why I'd love to introduce this feature. I'll start to write roadmap, but in meantime, if someone would like to contribute, I'd be more than happy to help with Async Storage's web support. |
@krizzu if I am correct, you can probably just move the code from this repo (as it's supported) to yours? |
As @MoOx says, just copying the existing code over for now would relieve us who try and run RN and RNWeb with the same codebase from having separate imports for async-storage |
Before it's moved over to addWebpackAlias({
'@react-native-community/async-storage': 'react-native-web/dist/exports/AsyncStorage/index.js'
}), |
Please move this conversation to the repo where the API would be maintained. |
Is your feature request related to a problem? Please describe.
AsyncStorage module has been moved into a separate package https://github.com/react-native-community/react-native-async-storage
Describe a solution you'd like
Should we do something similar?
Describe alternatives you've considered
Since RNW is a monorepo, we could create
react-native-async-storage-web
(orreact-native-web-async-storage
.The text was updated successfully, but these errors were encountered: