From 752e1d8f4fd9fbd4d1ed161d7afd89db4e0cc59a Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Mon, 11 Apr 2016 01:38:14 +0000 Subject: [PATCH] Updated docs for next --- releases/next/docs/asyncstorage.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/releases/next/docs/asyncstorage.html b/releases/next/docs/asyncstorage.html index 55da8089192..79ac1efe816 100644 --- a/releases/next/docs/asyncstorage.html +++ b/releases/next/docs/asyncstorage.html @@ -1,8 +1,10 @@ AsyncStorage – React Native | A framework for building native apps using React

AsyncStorage #

Edit on GitHub

AsyncStorage is a simple, asynchronous, persistent, key-value storage system that is global to the app. It should be used instead of LocalStorage.

It is recommended that you use an abstraction on top of AsyncStorage instead of AsyncStorage directly for anything more than light usage since it -operates globally.

This JS code is a simple facade over the native iOS implementation to provide -a clear JS API, real Error objects, and simple non-multi functions. Each +operates globally.

On iOS, AsyncStorage is backed by native code that stores small values in a serialized +dictionary and larger values in separate files. On Android, AsyncStorage will use either +RocksDB or SQLite based on what is available. This JS code is a simple facade that +provides a clear JS API, real Error objects, and simple non-multi functions. Each method returns a Promise object.

Methods #

static getItem(key, callback?) #

Fetches key and passes the result to callback, along with an Error if there is any. Returns a Promise object.

static setItem(key, value, callback?) #

Sets value for key and calls callback on completion, along with an Error if there is any. Returns a Promise object.

static removeItem(key, callback?) #

Returns a Promise object.

static mergeItem(key, value, callback?) #

Merges existing value with input value, assuming they are stringified json.