Search.../

local

Used for local storage of data.

Description

Use the methods in Storage to manage local data.

Type:

StorageRead Only

Was this helpful?

Store an item in local storage

Copy Code
1import {local} from 'wix-storage-frontend';
2
3// ...
4
5local.setItem("key", "value");
Retrieve an item from local storage

Copy Code
1import {local} from 'wix-storage-frontend';
2
3// ...
4
5let value = local.getItem("key"); // "value"
Remove an item from local storage

Copy Code
1import {local} from 'wix-storage-frontend';
2
3// ...
4
5local.removeItem("key");
Remove all items from local storage

Copy Code
1import {local} from 'wix-storage-frontend';
2
3// ...
4
5local.clear();