Skip to main content
Module

x/jotai/src/vanilla/utils/atomWithStorage.ts>AsyncStorage

👻 Primitive and flexible state management for React
Go to Latest
interface AsyncStorage
import { type AsyncStorage } from "https://deno.land/x/jotai@v2.7.0/src/vanilla/utils/atomWithStorage.ts";

Properties

getItem: (key: string, initialValue: Value) => PromiseLike<Value>
setItem: (key: string, newValue: Value) => PromiseLike<void>
removeItem: (key: string) => PromiseLike<void>
optional
subscribe: (
key: string,
callback: (value: Value) => void,
initialValue: Value,
) => Unsubscribe