Open History to see the last commit
1---
2id: Atom
3title: Atom
4---
5β
6Defined in: [types.ts:42](https://github.com/TanStack/store/blob/main/packages/store/src/types.ts#L42)
7β
8## Extends
9β
10- [`BaseAtom`](BaseAtom.md)\<`T`\>
11β
12## Type Parameters
13β
14### T
15β
16`T`
17β
18## Properties
19β
20### get
21β
22```ts
23get: () => T;
24```
25β
26Defined in: [types.ts:30](https://github.com/TanStack/store/blob/main/packages/store/src/types.ts#L30)
27β
28#### Returns
29β
30`T`
31β
32#### Inherited from
33β
34[`BaseAtom`](BaseAtom.md).[`get`](BaseAtom.md#get)
35β
36***
37β
38### set
39β
40```ts
41set: (fn) => void & (value) => void;
42```
43β
44Defined in: [types.ts:44](https://github.com/TanStack/store/blob/main/packages/store/src/types.ts#L44)
45β
46Sets the value of the atom using a function.
47β
48***
49β
50### subscribe
51β
52```ts
53subscribe: (observer) => Subscription & (next, error?, complete?) => Subscription;
54```
55β
56Defined in: [types.ts:21](https://github.com/TanStack/store/blob/main/packages/store/src/types.ts#L21)
57β
58#### Inherited from
59β
60[`BaseAtom`](BaseAtom.md).[`subscribe`](BaseAtom.md#subscribe)