UNPKG

598 BTypeScriptView Raw
1import { useAtom } from 'jotai/react';
2import { 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): [
5 Value,
6 (action?: Action) => void
7];
8export declare function useReducerAtom<Value, Action>(anAtom: PrimitiveAtom<Value>, reducer: (v: Value, a: Action) => Value, options?: Options): [
9 Value,
10 (action: Action) => void
11];
12export {};
13declare type Awaited<T> = T extends Promise<infer V> ? V : T;
\No newline at end of file