jasonmerino / react-native-simple-store

A minimalistic wrapper around React Native's AsyncStorage.

Home Page:https://www.npmjs.com/package/react-native-simple-store

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not working with expo-cli

ioanungurean opened this issue · comments

Hello,

I really like this package and this might be a non-issue but I was wondering if there is a way to use this package with the expo-cli. I followed all the steps but when I try react-native link @react-native-community/async-storage it throws an error which is perfectly normal.

Is there another way to use this package with expo-cli?

If I don't link it then I have this error: Unable to resolve module @react-native-community/async-storage

Found a fix for this. If someone wants to use this package with expo-cli you need to use the v1.3.0 where AsyncStorage is imported like this: import { AsyncStorage } from 'react-native'.

The new import statement that is currently used in v2.0.0 (import AsyncStorage from '@react-native-community/async-storage') will work only when expo-cli will link the package and this will happen probably in their next release. (currently is v33.0.6)

This issue can be kept open so anyone who has an issue with it can easily find a solution.

Thanks for the research and updates here @ioanungurean! I'm going to close this issue. People will still be able to find it if they search for this issue.

The dependency should be changed to @react-native-async-storage/async-storage