createAtom

Function: createAtom()

Call Signature

ts
function createAtom<T>(getValue, options?): ReadonlyAtom<T>;
function createAtom<T>(getValue, options?): ReadonlyAtom<T>;

Defined in: atom.ts:126

Type Parameters

T

T

Parameters

getValue

(prev?) => T

options?

AtomOptions<T>

Returns

ReadonlyAtom<T>

Call Signature

ts
function createAtom<T>(initialValue, options?): Atom<T>;
function createAtom<T>(initialValue, options?): Atom<T>;

Defined in: atom.ts:130

Type Parameters

T

T

Parameters

initialValue

T

options?

AtomOptions<T>

Returns

Atom<T>