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
Latest
function unstable_withStorageValidator
import { unstable_withStorageValidator } from "https://deno.land/x/jotai@v2.10.2/src/vanilla/utils.ts";

Parameters

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

Returns

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