Async Storage can only store
string data, so in order to store object data you need to serialize it first.
For data that can be serialized to JSON you can use
JSON.stringify() when saving the data and
JSON.parse() when loading the data.
setItem() is used both to add new data item (when no data for given key exists), and to modify existing item (when previous data for given key exists).
Storing string value
Storing object value
getItem returns a promise that either resolves to stored value when data is found for given key, or returns
Reading string value
Reading object value
For more examples, head over to API section.