Files
firebase-js-sdk/docs-devsite/auth.reactnativeasyncstorage.md
Mark DuckworthandGitHub 017073ed9b Fix documentation links for function overloads and improve readability of function headings (#7864)
* Support function links to function overloads.

* Improve readability of headings for functions.
2023-12-15 16:17:10 -07:00

1.8 KiB

Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference

{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}

ReactNativeAsyncStorage interface

Interface for a supplied AsyncStorage.

Signature:

export interface ReactNativeAsyncStorage 

Methods

Method Description
getItem(key) Retrieve an item from storage.
removeItem(key) Remove an item from storage.
setItem(key, value) Persist an item in storage.

ReactNativeAsyncStorage.getItem()

Retrieve an item from storage.

Signature:

getItem(key: string): Promise<string | null>;

Parameters

Parameter Type Description
key string storage key.

Returns:

Promise<string | null>

ReactNativeAsyncStorage.removeItem()

Remove an item from storage.

Signature:

removeItem(key: string): Promise<void>;

Parameters

Parameter Type Description
key string storage key.

Returns:

Promise<void>

ReactNativeAsyncStorage.setItem()

Persist an item in storage.

Signature:

setItem(key: string, value: string): Promise<void>;

Parameters

Parameter Type Description
key string storage key.
value string storage value.

Returns:

Promise<void>