import { Atom, AtomOptions, ReadonlyAtom } from "@tanstack/store";
//#region src/useCreateAtom.d.ts
/**
* Creates a stable atom instance for the lifetime of the component.
*
* Pass an initial value to create a writable atom, or a getter function to
* create a readonly derived atom. This mirrors {@link createAtom}, but only
* creates the atom once per component mount.
*
* @example
* ```tsx
* function Counter() {
* const countAtom = useCreateAtom(0)
* const [count, setCount] = useAtom(countAtom)
*
* return (
*
* )
* }
* ```
*/
declare function useCreateAtom(getValue: (prev?: NoInfer) => T, options?: AtomOptions): ReadonlyAtom;
declare function useCreateAtom(initialValue: T, options?: AtomOptions): Atom;
//#endregion
export { useCreateAtom };
//# sourceMappingURL=useCreateAtom.d.cts.map