AsyncStroage Deprecated

Async Storage is deprecated and i want to know how to use it from https://github.com/react-native-community/react-native-async-storage/issues/89 , but they told isn’t availbale on expo, what should i do.

When i try to use by import the AsyncStorage from @react-native-community/async-storage
like :

import AsyncStorage from ‘@react-native-community/async-storage’;

it produce error like :

[@RNC/AsyncStorage]: NativeModule: AsyncStorage is null.

To fix this issue try these steps:

• Run react-native link @react-native-community/async-storage in the project root.

• Rebuild and restart the app.

• Run the packager with --clearCache flag.

• If you are using CocoaPods on iOS, run pod install in the ios directory and then rebuild and re-run the app.

6 Likes