Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/jotai/src/vanilla/utils.ts>unstable_withStorageValidator

👻 Primitive and flexible state management for React
Go to Latest
function unstable_withStorageValidator
import { unstable_withStorageValidator } from "https://deno.land/x/jotai@v2.7.2/src/vanilla/utils.ts";

Parameters

validator: (value: unknown) => value is Value

Returns

{ (storage: AsyncStorage<unknown>): AsyncStorage<Value>; (storage: SyncStorage<unknown>): SyncStorage<Value>; }