0

I am trying to use async storage with "react native web" but it is saying " AsyncStorage is null".

commands I ran:

yarn add @react-native-community/async-storage

react-native link @react-native-community/async-storage

When I try to open localhost:3000, it says that error.

Any idea how to fix this?

user2349115
  • 1,288
  • 2
  • 17
  • 34

1 Answers1

1

I think one thing you can do is use @callstack/async-storage module.

import AsyncStorage from '@callstack/async-storage';

According to their github repo, you can use it on web and mobile and works excellent with redux-persist.

Jeremiah
  • 350
  • 4
  • 12