Async Storage needed in npm package and getting null

Please provide the following:

  1. SDK Version: 36
  2. Platforms(Android/iOS/web/all): Android/Ios


I am using a package to connect a react-native-app to a meteor backend.

This packages relies on AsyncStorage and I get the following error:

I don’t think I am supposed to do any linking in a managed app.

The expo doc says that I should still import AsyncStorage from react-native but the package seems to want to use the community edition. Any idea how to solve this ?

I’m facing the same issue “AsyncStorage is null”, in SDK 37.
It was working well in SDK 35.

Mee too, occurs now.

To use AsyncStorage in SDK 36 and 37, import it with:

import { AsyncStorage } from 'react-native';

If there is code that you didn’t write but installed, it’s all application code from the perspective of the Expo runtime. You’d need to modify the application code to use the import above.

Some ways you can do this are by editing the code or writing a Babel transform, just as long as it’s importing AsyncStorage from the “react-native” package.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.