UNPKG

381 BTypeScriptView Raw
1import { Draft } from 'immer';
2import { WritableAtom } from 'jotai';
3export declare function useImmerAtom<Value>(anAtom: WritableAtom<Value, (draft: Draft<Value>) => void>): [Value, (fn: (draft: Draft<Value>) => void) => void];
4export declare function useImmerAtom<Value>(anAtom: WritableAtom<Value, (value: Value) => Value>): [Value, (fn: (draft: Draft<Value>) => void) => void];