docs-devsite/auth.reactnativeasyncstorage.md
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 %}
Interface for a supplied AsyncStorage<!-- -->.
<b>Signature:</b>
export interface ReactNativeAsyncStorage
| Method | Description |
|---|---|
| getItem(key) | Retrieve an item from storage. |
| removeItem(key) | Remove an item from storage. |
| setItem(key, value) | Persist an item in storage. |
Retrieve an item from storage.
<b>Signature:</b>
getItem(key: string): Promise<string | null>;
| Parameter | Type | Description |
|---|---|---|
| key | string | storage key. |
<b>Returns:</b>
Promise<string | null>
Remove an item from storage.
<b>Signature:</b>
removeItem(key: string): Promise<void>;
| Parameter | Type | Description |
|---|---|---|
| key | string | storage key. |
<b>Returns:</b>
Promise<void>
Persist an item in storage.
<b>Signature:</b>
setItem(key: string, value: string): Promise<void>;
| Parameter | Type | Description |
|---|---|---|
| key | string | storage key. |
| value | string | storage value. |
<b>Returns:</b>
Promise<void>