storage/add
Save persistent data to the app
Fields
type
• string required
type
• string requiredTypes can be string
, number
, boolean
, json
string
, number
, boolean
, json
key
• string required
key
• string requiredThis is the value you would like to add to your storage. This can also use dot notation ex.user.age
user.age
value
• string required
value
• string requiredThe value to store. Can be a string, number, boolean, or JSON object. Capped at 2000 bytes
The storage/add action stores a key-value pair in the app's local storage. This storage persists across app sessions and can be used to store user preferences, temporary data, or any other information your app needs to remember.
The storage system supports dot notation for organizing data hierarchically (e.g., user.name, settings.theme).
Basic usage - Saving a basic value to Storge
Tapcart.action("storage/add", {
"type": "boolean",
"key": "is_vip",
"value": true
});
Basic usage - Saving custom data to storage
Tapcart.action("storage/add", {
"type": "json",
"key": "customer_profile",
"value": {
"age": 26,
"gender": "f",
"location": "california"
}
});
Updated 9 days ago