UNPKG

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