UNPKG

441 BTypeScriptView Raw
1import type { PrimitiveAtom } from 'jotai';
2import type { Scope } from '../core/atom';
3export declare function useReducerAtom<Value, Action>(anAtom: PrimitiveAtom<Value>, reducer: (v: Value, a?: Action) => Value, scope?: Scope): [Value, (action?: Action) => void];
4export declare function useReducerAtom<Value, Action>(anAtom: PrimitiveAtom<Value>, reducer: (v: Value, a: Action) => Value, scope?: Scope): [Value, (action: Action) => void];