jotai
Version:
👻 Next gen state management that will spook you
6 lines (5 loc) • 327 B
TypeScript
import type { WritableAtom } from 'jotai';
import { RESET } from './constants';
declare type SetStateActionWithReset<Value> = Value | typeof RESET | ((prev: Value) => Value | typeof RESET);
export declare function atomWithReset<Value>(initialValue: Value): WritableAtom<Value, SetStateActionWithReset<Value>, void>;
export {};