Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

LitSubscribeMethod.md

49 lines735 Bytes

1---
2id: LitSubscribeMethod
3title: LitSubscribeMethod
4---
5​
6Defined in: [tanstack-form-controller.ts:148](https://github.com/TanStack/form/blob/main/packages/lit-form/src/tanstack-form-controller.ts#L148)
7​
8## Type Parameters
9​
10### TState
11​
12`TState`
13​
14## Methods
15​
16### subscribe()
17​
18```ts
19subscribe<TSelected>(
20 selector,
21 render,
22 when?): unknown;
23```
24​
25Defined in: [tanstack-form-controller.ts:149](https://github.com/TanStack/form/blob/main/packages/lit-form/src/tanstack-form-controller.ts#L149)
26​
27#### Type Parameters
28​
29##### TSelected
30​
31`TSelected`
32​
33#### Parameters
34​
35##### selector
36​
37(`state`) => `TSelected`
38​
39##### render
40​
41`RenderCallback`\<`NoInfer`\<`TSelected`\>\>
42​
43##### when?
44​
45(`selected`) => `boolean`
46​
47#### Returns
48​
49`unknown`