TanStack

createAtom

Function: createAtom()

Call Signature

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

Defined in: node_modules/.pnpm/@tanstack+store@0.11.0/node_modules/@tanstack/store/dist/atom.d.ts:17

Type Parameters

T

T

Parameters

getValue

(prev?) => T

options?

AtomOptions<T>

Returns

ReadonlyAtom<T>

Call Signature

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

Defined in: node_modules/.pnpm/@tanstack+store@0.11.0/node_modules/@tanstack/store/dist/atom.d.ts:18

Type Parameters

T

T

Parameters

initialValue

T

options?

AtomOptions<T>

Returns

Atom<T>