UNPKG

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