Closed
Description
Current behavior
It seems like the web example got broken at some point. When I run start:web
, I get the following error message:
Module not found: Can't resolve '@react-native-async-storage/async-storage'
in both async-storage/example/examples/GetSetClear.js
and async-storage/example/examples/MergeItem.js
. When I tried changing the import to ../src/index
, I got a little further but hit this instead:
Unhandled Rejection (TypeError): Cannot read property 'getItem' of undefined
GetSet.componentWillMount$
/~/example/examples/GetSetClear.js:29
26 | };
27 |
28 | async componentWillMount() {
> 29 | const storedNumber = await AsyncStorage.getItem(STORAGE_KEY);
| ^
30 | if (storedNumber) {
31 | this.setState({
32 | storedNumber,
Expected behavior
yarn start:web
should work out of box.
Repro steps
yarn
yarn start:web
Environment
- Async Storage version:
master