@react-native/virtualized-lists 0.76.0-nightly-20240801-TEMP → 0.76.0-nightly-20240815-9bc32a010

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -939,7 +939,7 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
939
939
  // 2a. Add a cell for ListEmptyComponent if applicable
940
940
  const itemCount = this.props.getItemCount(data);
941
941
  if (itemCount === 0 && ListEmptyComponent) {
942
- const element: React.Element<any> = ((React.isValidElement(
942
+ const element: ExactReactElement_DEPRECATED<any> = ((React.isValidElement(
943
943
  ListEmptyComponent,
944
944
  ) ? (
945
945
  ListEmptyComponent
@@ -25,7 +25,7 @@ export type Props<ItemT> = {
25
25
  ItemSeparatorComponent: ?React.ComponentType<
26
26
  any | {highlighted: boolean, leadingItem: ?ItemT},
27
27
  >,
28
- ListItemComponent?: ?(React.ComponentType<any> | React.Element<any>),
28
+ ListItemComponent?: ?(React.ComponentType<any> | React.MixedElement),
29
29
  cellKey: string,
30
30
  horizontal: ?boolean,
31
31
  index: number,
@@ -155,17 +155,26 @@ type OptionalProps = {|
155
155
  * `highlight` and `unhighlight` (which set the `highlighted: boolean` prop) are insufficient for
156
156
  * your use-case.
157
157
  */
158
- ListItemComponent?: ?(React.ComponentType<any> | React.Element<any>),
158
+ ListItemComponent?: ?(
159
+ | React.ComponentType<any>
160
+ | ExactReactElement_DEPRECATED<any>
161
+ ),
159
162
  /**
160
163
  * Rendered when the list is empty. Can be a React Component Class, a render function, or
161
164
  * a rendered element.
162
165
  */
163
- ListEmptyComponent?: ?(React.ComponentType<any> | React.Element<any>),
166
+ ListEmptyComponent?: ?(
167
+ | React.ComponentType<any>
168
+ | ExactReactElement_DEPRECATED<any>
169
+ ),
164
170
  /**
165
171
  * Rendered at the bottom of all the items. Can be a React Component Class, a render function, or
166
172
  * a rendered element.
167
173
  */
168
- ListFooterComponent?: ?(React.ComponentType<any> | React.Element<any>),
174
+ ListFooterComponent?: ?(
175
+ | React.ComponentType<any>
176
+ | ExactReactElement_DEPRECATED<any>
177
+ ),
169
178
  /**
170
179
  * Styling for internal View for ListFooterComponent
171
180
  */
@@ -174,7 +183,10 @@ type OptionalProps = {|
174
183
  * Rendered at the top of all the items. Can be a React Component Class, a render function, or
175
184
  * a rendered element.
176
185
  */
177
- ListHeaderComponent?: ?(React.ComponentType<any> | React.Element<any>),
186
+ ListHeaderComponent?: ?(
187
+ | React.ComponentType<any>
188
+ | ExactReactElement_DEPRECATED<any>
189
+ ),
178
190
  /**
179
191
  * Styling for internal View for ListHeaderComponent
180
192
  */
@@ -244,7 +256,7 @@ type OptionalProps = {|
244
256
  * <RefreshControl> component built internally. The onRefresh and refreshing
245
257
  * props are also ignored. Only works for vertical VirtualizedList.
246
258
  */
247
- refreshControl?: ?React.Element<any>,
259
+ refreshControl?: ?ExactReactElement_DEPRECATED<any>,
248
260
  /**
249
261
  * Set this true while waiting for new data from a refresh.
250
262
  */
@@ -258,7 +270,7 @@ type OptionalProps = {|
258
270
  /**
259
271
  * Render a custom scroll component, e.g. with a differently styled `RefreshControl`.
260
272
  */
261
- renderScrollComponent?: (props: Object) => React.Element<any>,
273
+ renderScrollComponent?: (props: Object) => ExactReactElement_DEPRECATED<any>,
262
274
  /**
263
275
  * Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off
264
276
  * screen. Similar fill rate/responsiveness tradeoff as `maxToRenderPerBatch`.
@@ -38,7 +38,7 @@ export type SectionBase<SectionItemT> = {
38
38
  ...
39
39
  },
40
40
  ...
41
- }) => null | React.Element<any>,
41
+ }) => null | React.MixedElement,
42
42
  ItemSeparatorComponent?: ?React.ComponentType<any>,
43
43
  keyExtractor?: (item: SectionItemT, index?: ?number) => string,
44
44
  ...
@@ -447,8 +447,8 @@ class VirtualizedSectionList<
447
447
 
448
448
  _updateHighlightMap: {[string]: (boolean) => void} = {};
449
449
  _updatePropsMap: {[string]: void | (boolean => void)} = {};
450
- _listRef: ?React.ElementRef<typeof VirtualizedList>;
451
- _captureRef = (ref: null | React$ElementRef<Class<VirtualizedList>>) => {
450
+ _listRef: ?VirtualizedList;
451
+ _captureRef = (ref: null | VirtualizedList) => {
452
452
  this._listRef = ref;
453
453
  };
454
454
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native/virtualized-lists",
3
- "version": "0.76.0-nightly-20240801-TEMP",
3
+ "version": "0.76.0-nightly-20240815-9bc32a010",
4
4
  "description": "Virtualized lists for React Native.",
5
5
  "license": "MIT",
6
6
  "repository": {