@@ -8,10 +8,10 @@ title: Subscribe
88## Call Signature
99
1010``` ts
11- function Subscribe<TFeatures , TData , TSourceValue >(props ): ReactNode | Promise <ReactNode >;
11+ function Subscribe<TSourceValue >(props ): ReactNode | Promise <ReactNode >;
1212```
1313
14- Defined in: [ Subscribe.ts:148 ] ( https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L148 )
14+ Defined in: [ Subscribe.ts:125 ] ( https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L125 )
1515
1616A React component that allows you to subscribe to the table state.
1717
@@ -22,14 +22,6 @@ contextual typing works. This standalone component uses a union `props` type.
2222
2323### Type Parameters
2424
25- #### TFeatures
26-
27- ` TFeatures ` * extends* ` TableFeatures `
28-
29- #### TData
30-
31- ` TData ` * extends* ` RowData `
32-
3325#### TSourceValue
3426
3527` TSourceValue `
@@ -38,7 +30,7 @@ contextual typing works. This standalone component uses a union `props` type.
3830
3931#### props
4032
41- [ ` SubscribePropsWithSourceIdentity ` ] ( ../type-aliases/SubscribePropsWithSourceIdentity.md ) \< ` TFeatures ` , ` TData ` , ` TSourceValue ` \>
33+ [ ` SubscribePropsWithSourceIdentity ` ] ( ../type-aliases/SubscribePropsWithSourceIdentity.md ) \< ` TSourceValue ` \>
4234
4335### Returns
4436
@@ -48,7 +40,7 @@ contextual typing works. This standalone component uses a union `props` type.
4840
4941``` tsx
5042// As a standalone component — full store
51- <Subscribe table = { table } selector = { (state ) => ({ rowSelection: state .rowSelection })} >
43+ <Subscribe source = { table . store } selector = { (state ) => ({ rowSelection: state .rowSelection })} >
5244 { ({ rowSelection }) => (
5345 <div >Selected rows: { Object .keys (rowSelection ).length } </div >
5446 )}
@@ -57,15 +49,14 @@ contextual typing works. This standalone component uses a union `props` type.
5749
5850``` tsx
5951// Entire source (atom or store) — no selector
60- <Subscribe table = { table } source = { table .atoms .rowSelection } >
52+ <Subscribe source = { table .atoms .rowSelection } >
6153 { (rowSelection ) => <div >...</div >}
6254</Subscribe >
6355```
6456
6557``` tsx
6658// Project source value (e.g. one row’s selection)
6759<Subscribe
68- table = { table }
6960 source = { table .atoms .rowSelection }
7061 selector = { (rowSelection ) => rowSelection ?.[row .id ]}
7162>
@@ -85,10 +76,10 @@ contextual typing works. This standalone component uses a union `props` type.
8576## Call Signature
8677
8778``` ts
88- function Subscribe<TFeatures , TData , TSourceValue , TSelected >(props ): ReactNode | Promise <ReactNode >;
79+ function Subscribe<TSourceValue , TSelected >(props ): ReactNode | Promise <ReactNode >;
8980```
9081
91- Defined in: [ Subscribe.ts:155 ] ( https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L155 )
82+ Defined in: [ Subscribe.ts:128 ] ( https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L128 )
9283
9384A React component that allows you to subscribe to the table state.
9485
@@ -99,14 +90,6 @@ contextual typing works. This standalone component uses a union `props` type.
9990
10091### Type Parameters
10192
102- #### TFeatures
103-
104- ` TFeatures ` * extends* ` TableFeatures `
105-
106- #### TData
107-
108- ` TData ` * extends* ` RowData `
109-
11093#### TSourceValue
11194
11295` TSourceValue `
@@ -119,7 +102,7 @@ contextual typing works. This standalone component uses a union `props` type.
119102
120103#### props
121104
122- [ ` SubscribePropsWithSourceWithSelector ` ] ( ../type-aliases/SubscribePropsWithSourceWithSelector.md ) \< ` TFeatures ` , ` TData ` , ` TSourceValue ` , ` TSelected ` \>
105+ [ ` SubscribePropsWithSourceWithSelector ` ] ( ../type-aliases/SubscribePropsWithSourceWithSelector.md ) \< ` TSourceValue ` , ` TSelected ` \>
123106
124107### Returns
125108
@@ -129,7 +112,7 @@ contextual typing works. This standalone component uses a union `props` type.
129112
130113``` tsx
131114// As a standalone component — full store
132- <Subscribe table = { table } selector = { (state ) => ({ rowSelection: state .rowSelection })} >
115+ <Subscribe source = { table . store } selector = { (state ) => ({ rowSelection: state .rowSelection })} >
133116 { ({ rowSelection }) => (
134117 <div >Selected rows: { Object .keys (rowSelection ).length } </div >
135118 )}
@@ -138,15 +121,14 @@ contextual typing works. This standalone component uses a union `props` type.
138121
139122``` tsx
140123// Entire source (atom or store) — no selector
141- <Subscribe table = { table } source = { table .atoms .rowSelection } >
124+ <Subscribe source = { table .atoms .rowSelection } >
142125 { (rowSelection ) => <div >...</div >}
143126</Subscribe >
144127```
145128
146129``` tsx
147130// Project source value (e.g. one row’s selection)
148131<Subscribe
149- table = { table }
150132 source = { table .atoms .rowSelection }
151133 selector = { (rowSelection ) => rowSelection ?.[row .id ]}
152134>
@@ -166,10 +148,10 @@ contextual typing works. This standalone component uses a union `props` type.
166148## Call Signature
167149
168150``` ts
169- function Subscribe<TFeatures , TData , TSelected >(props ): ReactNode | Promise <ReactNode >;
151+ function Subscribe<TFeatures , TSelected >(props ): ReactNode | Promise <ReactNode >;
170152```
171153
172- Defined in: [ Subscribe.ts:168 ] ( https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L168 )
154+ Defined in: [ Subscribe.ts:131 ] ( https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L131 )
173155
174156A React component that allows you to subscribe to the table state.
175157
@@ -184,10 +166,6 @@ contextual typing works. This standalone component uses a union `props` type.
184166
185167` TFeatures ` * extends* ` TableFeatures `
186168
187- #### TData
188-
189- ` TData ` * extends* ` RowData `
190-
191169#### TSelected
192170
193171` TSelected `
@@ -196,7 +174,7 @@ contextual typing works. This standalone component uses a union `props` type.
196174
197175#### props
198176
199- [ ` SubscribePropsWithStore ` ] ( ../type-aliases/SubscribePropsWithStore.md ) \< ` TFeatures ` , ` TData ` , ` TSelected ` \>
177+ [ ` SubscribePropsWithStore ` ] ( ../type-aliases/SubscribePropsWithStore.md ) \< ` TFeatures ` , ` TSelected ` \>
200178
201179### Returns
202180
@@ -206,7 +184,7 @@ contextual typing works. This standalone component uses a union `props` type.
206184
207185``` tsx
208186// As a standalone component — full store
209- <Subscribe table = { table } selector = { (state ) => ({ rowSelection: state .rowSelection })} >
187+ <Subscribe source = { table . store } selector = { (state ) => ({ rowSelection: state .rowSelection })} >
210188 { ({ rowSelection }) => (
211189 <div >Selected rows: { Object .keys (rowSelection ).length } </div >
212190 )}
@@ -215,15 +193,14 @@ contextual typing works. This standalone component uses a union `props` type.
215193
216194``` tsx
217195// Entire source (atom or store) — no selector
218- <Subscribe table = { table } source = { table .atoms .rowSelection } >
196+ <Subscribe source = { table .atoms .rowSelection } >
219197 { (rowSelection ) => <div >...</div >}
220198</Subscribe >
221199```
222200
223201``` tsx
224202// Project source value (e.g. one row’s selection)
225203<Subscribe
226- table = { table }
227204 source = { table .atoms .rowSelection }
228205 selector = { (rowSelection ) => rowSelection ?.[row .id ]}
229206>
0 commit comments