# Subscribe

# Function: Subscribe()

```ts
function Subscribe<TSourceData, TSelected>(props): ReactNode;
```

Defined in: [packages/react-form/src/Subscribe.public.tsx:36](https://github.com/TanStack/form/blob/main/packages/react-form/src/Subscribe.public.tsx#L36)

A React component that allows you to subscribe to source state.

This is useful for opting into state re-renders for specific parts of the state.

## Type Parameters

### TSourceData

`TSourceData`

### TSelected

`TSelected`

## Parameters

### props

[`SubscribeProps`](../interfaces/SubscribeProps.md)\<`TSourceData`, `TSelected`\>

## Returns

`ReactNode`
