From 89d3146eb2ee3bc51f058183a2c8df10aa67140e Mon Sep 17 00:00:00 2001 From: Kyle Diggs Date: Tue, 13 Feb 2024 20:37:51 -0800 Subject: [PATCH 1/2] Fix for #36828 - props not being copied into constructor --- packages/react-native/Libraries/Lists/FlatList.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/Libraries/Lists/FlatList.js b/packages/react-native/Libraries/Lists/FlatList.js index 3d267cb95988ed..243facb7540b24 100644 --- a/packages/react-native/Libraries/Lists/FlatList.js +++ b/packages/react-native/Libraries/Lists/FlatList.js @@ -425,6 +425,7 @@ class FlatList extends React.PureComponent, void> { constructor(props: Props) { super(props); + this.props = props; this._checkProps(this.props); if (this.props.viewabilityConfigCallbackPairs) { this._virtualizedListPairs = From 709845ba6477705423a48d54198841b0f5ddd711 Mon Sep 17 00:00:00 2001 From: Kyle Diggs Date: Tue, 13 Feb 2024 21:53:39 -0800 Subject: [PATCH 2/2] possibly the actual culprit of the issue. Race condition? --- packages/react-native/Libraries/Lists/FlatList.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/react-native/Libraries/Lists/FlatList.js b/packages/react-native/Libraries/Lists/FlatList.js index 243facb7540b24..1d599631324a9c 100644 --- a/packages/react-native/Libraries/Lists/FlatList.js +++ b/packages/react-native/Libraries/Lists/FlatList.js @@ -425,8 +425,7 @@ class FlatList extends React.PureComponent, void> { constructor(props: Props) { super(props); - this.props = props; - this._checkProps(this.props); + this._checkProps(props); if (this.props.viewabilityConfigCallbackPairs) { this._virtualizedListPairs = this.props.viewabilityConfigCallbackPairs.map(pair => ({