jotai
Version:
👻 Next gen state management that will spook you
14 lines (13 loc) • 473 B
TypeScript
import { useStore } from 'jotai/react';
import type { Atom } from 'jotai/vanilla';
type Options = Parameters<typeof useStore>[0];
type AnyAtomValue = unknown;
type AnyAtom = Atom<AnyAtomValue>;
type AtomsValues = Map<AnyAtom, AnyAtomValue>;
type AtomsDependents = Map<AnyAtom, Set<AnyAtom>>;
type AtomsSnapshot = Readonly<{
values: AtomsValues;
dependents: AtomsDependents;
}>;
export declare function useAtomsSnapshot(options?: Options): AtomsSnapshot;
export {};