Open History to see the last commit
1---
2id: Subscribe
3title: Subscribe
4---
5β
6```ts
7function Subscribe<TSourceData, TSelected>(props): ComponentChildren;
8```
9β
10Defined in: [packages/preact-form/src/Subscribe.public.tsx:38](https://github.com/TanStack/form/blob/main/packages/preact-form/src/Subscribe.public.tsx#L38)
11β
12A Preact component that allows you to subscribe to source state.
13β
14This is useful for opting into state re-renders for specific parts of the state.
15β
16## Type Parameters
17β
18### TSourceData
19β
20`TSourceData`
21β
22### TSelected
23β
24`TSelected`
25β
26## Parameters
27β
28### props
29β
30[`SubscribeProps`](../interfaces/SubscribeProps.md)\<`TSourceData`, `TSelected`\>
31β
32## Returns
33β
34`ComponentChildren`