@react-native/virtualized-lists 0.72.5 → 0.73.0-nightly-20230604-2d07d5f16

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.
@@ -14,7 +14,7 @@ import * as React from 'react';
14
14
  /**
15
15
  * `setState` is called asynchronously, and should not rely on the value of
16
16
  * `this.props` or `this.state`:
17
- * https://reactjs.org/docs/state-and-lifecycle.html#state-updates-may-be-asynchronous
17
+ * https://react.dev/docs/state-and-lifecycle.html#state-updates-may-be-asynchronous
18
18
  *
19
19
  * SafePureComponent adds runtime enforcement, to catch cases where these
20
20
  * variables are read in a state updater function, instead of the ones passed
@@ -32,7 +32,7 @@ export default class StateSafePureComponent<
32
32
  }
33
33
 
34
34
  setState(
35
- partialState: ?($Shape<State> | ((State, Props) => ?$Shape<State>)),
35
+ partialState: ?(Partial<State> | ((State, Props) => ?Partial<State>)),
36
36
  callback?: () => mixed,
37
37
  ): void {
38
38
  if (typeof partialState === 'function') {
@@ -267,7 +267,7 @@ export interface VirtualizedListWithoutRenderItemProps<ItemT>
267
267
 
268
268
  /**
269
269
  * The maximum number of items to render in each incremental render batch. The more rendered at
270
- * once, the better the fill rate, but responsiveness my suffer because rendering content may
270
+ * once, the better the fill rate, but responsiveness may suffer because rendering content may
271
271
  * interfere with responding to button taps or other interactions.
272
272
  */
273
273
  maxToRenderPerBatch?: number | undefined;
@@ -36,7 +36,7 @@ export type Props<ItemT> = {
36
36
  onUnmount: (cellKey: string) => void,
37
37
  onUpdateSeparators: (
38
38
  cellKeys: Array<?string>,
39
- props: $Shape<SeparatorProps<ItemT>>,
39
+ props: Partial<SeparatorProps<ItemT>>,
40
40
  ) => void,
41
41
  prevCellKey: ?string,
42
42
  renderItem?: ?RenderItemType<ItemT>,
@@ -561,7 +561,7 @@ function ItemWithSeparator(props: ItemWithSeparatorProps): React.Node {
561
561
  },
562
562
  updateProps: (
563
563
  select: 'leading' | 'trailing',
564
- newProps: $Shape<ItemWithSeparatorCommonProps>,
564
+ newProps: Partial<ItemWithSeparatorCommonProps>,
565
565
  ) => {
566
566
  if (select === 'leading') {
567
567
  if (LeadingSeparatorComponent != null) {
package/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # @react-native/virtualized-lists
2
+
3
+ [![Version][version-badge]][package]
4
+
5
+ ## Installation
6
+
7
+ ```
8
+ yarn add @react-native/virtualized-lists
9
+ ```
10
+
11
+ *Note: We're using `yarn` to install deps. Feel free to change commands to use `npm` 3+ and `npx` if you like*
12
+
13
+ [version-badge]: https://img.shields.io/npm/v/@react-native/virtualized-lists?style=flat-square
14
+ [package]: https://www.npmjs.com/package/@react-native/virtualized-lists
15
+
16
+ ## Testing
17
+
18
+ To run the tests in this package, run the following commands from the React Native root folder:
19
+
20
+ 1. `yarn` to install the dependencies. You just need to run this once
21
+ 2. `yarn jest packages/virtualized-lists`.
package/package.json CHANGED
@@ -1,13 +1,24 @@
1
1
  {
2
2
  "name": "@react-native/virtualized-lists",
3
- "version": "0.72.5",
3
+ "version": "0.73.0-nightly-20230604-2d07d5f16",
4
4
  "description": "Virtualized lists for React Native.",
5
+ "license": "MIT",
5
6
  "repository": {
6
7
  "type": "git",
7
- "url": "git@github.com:facebook/react-native.git",
8
+ "url": "https://github.com/facebook/react-native.git",
8
9
  "directory": "packages/virtualized-lists"
9
10
  },
10
- "license": "MIT",
11
+ "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/virtualized-lists#readme",
12
+ "keywords": [
13
+ "lists",
14
+ "virtualized-lists",
15
+ "section-lists",
16
+ "react-native"
17
+ ],
18
+ "bugs": "https://github.com/facebook/react-native/issues",
19
+ "engines": {
20
+ "node": ">=16"
21
+ },
11
22
  "dependencies": {
12
23
  "invariant": "^2.2.4",
13
24
  "nullthrows": "^1.1.1"