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>SyncStorage

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

Properties

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