Local-storage API
chevron down
 

Local-storage API

Variable: localStorage

Type: Storage

The LocalStorage API provides Storage that keeps a persistent list of key/value pairs.

import { localStorage } from "local-storage";
localStorage.setItem("myKey", "myValue");
console.log(localStorage.getItem("myKey"));