mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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 https://github.com/facebook/react-native/issues/34783   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: https://github.com/facebook/react-native/pull/43141 Reviewed By: javache Differential Revision: D54069559 Pulled By: robhogan fbshipit-source-id: b39cd9a273eb0279ed353f9efcb66a3c4ccf93b4
This commit is contained in:
@@ -308,7 +308,6 @@ export type Props<ItemT> = {
|
||||
* Also inherits [ScrollView Props](docs/scrollview.html#props), unless it is nested in another FlatList of same orientation.
|
||||
*/
|
||||
class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
|
||||
props: Props<ItemT>;
|
||||
/**
|
||||
* Scrolls to the end of the content. May be janky without `getItemLayout` prop.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user