UNPKG

jotai

Version:

👻 Primitive and flexible state management for React

4 lines (3 loc) • 384 B
import type { WritableAtom } from '../../vanilla.js'; export declare function atomWithReducer<Value, Action>(initialValue: Value, reducer: (value: Value, action?: Action) => Value): WritableAtom<Value, [Action?], void>; export declare function atomWithReducer<Value, Action>(initialValue: Value, reducer: (value: Value, action: Action) => Value): WritableAtom<Value, [Action], void>;