Search.../

memory

Used for memory storage of data.

Description

Use the methods in Storage to manage memory data.

Type:

StorageRead Only

Was this helpful?

Store an item in memory storage

Code Example

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

Code Example

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

Code Example

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

Code Example

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