UNPKG

499 BTypeScriptView Raw
1import { useAtom } from 'jotai';
2import type { PrimitiveAtom } from 'jotai';
3type Scope = NonNullable<Parameters<typeof useAtom>[1]>;
4export declare function useReducerAtom<Value, Action>(anAtom: PrimitiveAtom<Value>, reducer: (v: Value, a?: Action) => Value, scope?: Scope): [Value, (action?: Action) => void];
5export declare function useReducerAtom<Value, Action>(anAtom: PrimitiveAtom<Value>, reducer: (v: Value, a: Action) => Value, scope?: Scope): [Value, (action: Action) => void];
6export {};