AsyncStorage
Support
Install
$ npm install universal-asyncstorage --save
Usage
; // How to use it in quickapp// import chooseImage from 'universal-asyncstorage/lib/quickapp; // setItem(key, value)AsyncStorage; // getItem(key)AsyncStorage; // removeItem(key)AsyncStorage; // getAllKeys()AsyncStorage; // clear()AsyncStorageclear;
Methods
setItem(key: string, value: string): Promise<null>
Arguments
Property | Type | Description | Default |
---|---|---|---|
key | string |
Storage key | - |
value | string |
Storage value | - |
getItem(key: string): Promise<string | null>
Arguments
Property | Type | Description | Default |
---|---|---|---|
key | string |
Storage key | - |
Returns
Property | Type | Description |
---|---|---|
result | string | null |
Storage value |
removeItem(key: string): Promise<null>
Arguments
Property | Type | Description | Default |
---|---|---|---|
key | string |
Storage key | - |
getAllKeys(): Promise<string[]>
Returns
Property | Type | Description |
---|---|---|
result | string[] |
Storage all keys |