Unable to work with React Native Async Storage

For others who still couldn't fix this issue: import AsyncStorage from react-native instead of React.

import { AsyncStorage } from 'react-native';

After reading your question, first thing I felt is "maybe" you are new to ES7, specifically async-await. Please read about async-await functions in ES7 which is about to be realeased later this year(2016).

Your functions have to be async in nature. Put the keyword before the function. And await has to be used where you make a call to the function.

Specifically I suggest you use react-native-store repo for your development. React Native guys have told to use this and other implementations clearly agreeing AsyncStorage is a bit complex to work with.

Tags:

React Native