Parameters
Success Callback
Code Example
Related APIs
my.setStorage
Store data
my.getStorageSync
Get data synchronously
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Retrieve data from local cache asynchronously.
| Property | Type | Required | Description |
|---|---|---|---|
| key | String | Yes | Storage key identifier |
| success | Function | No | Callback with data |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
| Property | Type | Description |
|---|---|---|
| data | Object/String | Stored data |
my.getStorage({
key: 'userSettings',
success: (res) => {
console.log('Data:', res.data);
},
fail: () => {
console.log('Key not found');
}
});