Skip to content

Commit e33767a

Browse files
dieguezzfacebook-github-bot
authored andcommitted
fix flatlist props being undefined in ios (#43141)
Summary: When using Flatlist on iOS and Android its failing because props are undefined The problem is described on #34783 ![Captura de pantalla 2024-02-22 a las 4 13 11](https://github.com/facebook/react-native/assets/1161455/325738d9-2e49-44a0-bb6a-077b2e02e9cd) ![Captura de pantalla 2024-02-22 a las 4 14 58](https://github.com/facebook/react-native/assets/1161455/118f76e1-a818-428e-938e-123b55536b49) Fixed by setting constructor before any statement and removing unnecessary props declaration at the top of the class. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [GENERAL] [FIXED] - Fix undefined props crash in FlatList Pull Request resolved: #43141 Reviewed By: javache Differential Revision: D54069559 Pulled By: robhogan fbshipit-source-id: b39cd9a273eb0279ed353f9efcb66a3c4ccf93b4
1 parent b857a6e commit e33767a

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

packages/react-native/Libraries/Lists/FlatList.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@ export type Props<ItemT> = {
308308
* Also inherits [ScrollView Props](docs/scrollview.html#props), unless it is nested in another FlatList of same orientation.
309309
*/
310310
class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
311-
props: Props<ItemT>;
312311
/**
313312
* Scrolls to the end of the content. May be janky without `getItemLayout` prop.
314313
*/

0 commit comments

Comments
 (0)