jotai
Version:
👻 Next gen state management that will spook you
11 lines • 522 B
TypeScript
import { PrimitiveAtom } from 'jotai';
import { Scope } from '../core/atom';
export declare function useReducerAtom<Value, Action>(anAtom: PrimitiveAtom<Value>, reducer: (v: Value, a?: Action) => Value, scope?: Scope): [
Value,
(action?: Action) => void
];
export declare function useReducerAtom<Value, Action>(anAtom: PrimitiveAtom<Value>, reducer: (v: Value, a: Action) => Value, scope?: Scope): [
Value,
(action: Action) => void
];
declare type Awaited<T> = T extends Promise<infer V> ? V : T;