UNPKG

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