@dbeining/react-atom
Version:
State management made simple for React. Built on React Hooks. Inspired by `atom`s in `reagent.cljs`.
9 lines (8 loc) • 774 B
TypeScript
/** @ignore */
export declare const calledUseAtomOutsideFunctionComponent = "useAtom can only be called inside the body of a function component";
/** @ignore */
export declare const calledUseAtomWithNonAtom = "useAtom only accepts `react-atom` Atoms, but got:";
/** @ignore */
export declare const calledDerefWithNonAtom = "deref only accepts `react-atom` Atoms, but got:";
/** @ignore */
export declare const multipleInstantiations = "Multiple instances of react-atom have been detected, which will lead to unexpected bugs in the useAtom custom hook. This usually means react-atom has been initialized with `initialize(hooks)` in addition to importing the default Atom, useAtom, etc. directly. To avoid this error, only use the implementation returned from `initialize`.";