TanStack

SubscribeProps

Interface: SubscribeProps<TSourceData, TSelected>

Defined in: packages/react-form/src/Subscribe.public.tsx:17

Subscribe to form.atom (full form state). The selector receives the full FormState.

Type Parameters

TSourceData

TSourceData

TSelected

TSelected

Properties

children

ts
children: ReactNode | ((state) => ReactNode);

Defined in: packages/react-form/src/Subscribe.public.tsx:28


selector

ts
selector: (state) => TSelected;

Defined in: packages/react-form/src/Subscribe.public.tsx:23

Select from full form state. Re-renders when the selected value changes (shallow compare).

Parameters

state

TSourceData

Returns

TSelected


source

ts
source: SubscribeSource<TSourceData>;

Defined in: packages/react-form/src/Subscribe.public.tsx:18


when?

ts
optional when?: (selected) => boolean;

Defined in: packages/react-form/src/Subscribe.public.tsx:27

Optional. If provided, the component will only render when the when function returns true.

Parameters

selected

NoInfer<TSelected>

Returns

boolean