jotai
Version:
👻 Next gen state management that will spook you
4 lines (3 loc) • 345 B
TypeScript
import { WritableAtom } from 'jotai';
export declare function atomWithReducer<Value, Action>(initialValue: Value, reducer: (v: Value, a?: Action) => Value): WritableAtom<Value, Action | undefined>;
export declare function atomWithReducer<Value, Action>(initialValue: Value, reducer: (v: Value, a: Action) => Value): WritableAtom<Value, Action>;