To learn more about local, session, or memory storage, see wix-storage-frontend
.
Get hands-on experience with the Storage API on our Hello Storage example page.
To use the Frontend Storage API, import the needed storage type(s) from the
wix-storage-frontend
module:
Removes all items from local, session, or memory storage.
Gets an item from local, session, or memory storage.
If an item does not exist, getItem()
resolves to null.
function getItem(key: string): string;
The key of the item to get.
import { local } from "wix-storage-frontend";
// ...
let value = local.getItem("key"); // "value"