Open History to see the last commit
1---
2id: SubscribeProps
3title: SubscribeProps
4---
5β
6Defined in: [packages/react-form/src/Subscribe.public.tsx:17](https://github.com/TanStack/form/blob/main/packages/react-form/src/Subscribe.public.tsx#L17)
7β
8Subscribe to `form.atom` (full form state). The selector receives the full
9FormState.
10β
11## Type Parameters
12β
13### TSourceData
14β
15`TSourceData`
16β
17### TSelected
18β
19`TSelected`
20β
21## Properties
22β
23### children
24β
25```ts
26children: ReactNode | ((state) => ReactNode);
27```
28β
29Defined in: [packages/react-form/src/Subscribe.public.tsx:28](https://github.com/TanStack/form/blob/main/packages/react-form/src/Subscribe.public.tsx#L28)
30β
31***
32β
33### selector
34β
35```ts
36selector: (state) => TSelected;
37```
38β
39Defined in: [packages/react-form/src/Subscribe.public.tsx:23](https://github.com/TanStack/form/blob/main/packages/react-form/src/Subscribe.public.tsx#L23)
40β
41Select from full form state. Re-renders when the selected value changes
42(shallow compare).
43β
44#### Parameters
45β
46##### state
47β
48`TSourceData`
49β
50#### Returns
51β
52`TSelected`
53β
54***
55β
56### source
57β
58```ts
59source: SubscribeSource<TSourceData>;
60```
61β
62Defined in: [packages/react-form/src/Subscribe.public.tsx:18](https://github.com/TanStack/form/blob/main/packages/react-form/src/Subscribe.public.tsx#L18)
63β
64***
65β
66### when?
67β
68```ts
69optional when?: (selected) => boolean;
70```
71β
72Defined in: [packages/react-form/src/Subscribe.public.tsx:27](https://github.com/TanStack/form/blob/main/packages/react-form/src/Subscribe.public.tsx#L27)
73β
74Optional. If provided, the component will only render when the `when` function returns `true`.
75β
76#### Parameters
77β
78##### selected
79β
80`NoInfer`\<`TSelected`\>
81β
82#### Returns
83β
84`boolean`