Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

createAtom.md

60 lines844 Bytes

1---
2id: createAtom
3title: createAtom
4---
5​
6## Call Signature
7​
8```ts
9function createAtom<T>(getValue, options?): ReadonlyAtom<T>;
10```
11​
12Defined in: node\_modules/.pnpm/@tanstack+store@0.11.1/node\_modules/@tanstack/store/dist/atom.d.ts:17
13​
14### Type Parameters
15​
16#### T
17​
18`T`
19​
20### Parameters
21​
22#### getValue
23​
24(`prev?`) => `T`
25​
26#### options?
27​
28[`AtomOptions`](../interfaces/AtomOptions.md)\<`T`\>
29​
30### Returns
31​
32[`ReadonlyAtom`](../interfaces/ReadonlyAtom.md)\<`T`\>
33​
34## Call Signature
35​
36```ts
37function createAtom<T>(initialValue, options?): Atom<T>;
38```
39​
40Defined in: node\_modules/.pnpm/@tanstack+store@0.11.1/node\_modules/@tanstack/store/dist/atom.d.ts:18
41​
42### Type Parameters
43​
44#### T
45​
46`T`
47​
48### Parameters
49​
50#### initialValue
51​
52`T`
53​
54#### options?
55​
56[`AtomOptions`](../interfaces/AtomOptions.md)\<`T`\>
57​
58### Returns
59​
60[`Atom`](../interfaces/Atom.md)\<`T`\>