Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.1.0/src/vanilla/utils/atomWithStorage.ts";

Properties

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