Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to pass ItemSeparatorComponent as React Element (#32748)
Summary: Currently `ListHeaderComponent` & `ListFooterComponent` allow to use React Componetn & Elemelen ```tsx <FlatList ListHeaderComponent={<View />} // valid ListHeaderComponent={View} // valid /> ``` But when you try to pass `ItemSeparatorComponent` as React Element it will throw an error ```tsx <FlatList ItemSeparatorComponent={View} // ok ItemSeparatorComponent={<View />} /* not valid: Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of `CellRenderer`. */ /> ``` So, this PR adds this ability ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [General] [Changed] - Add ability to pass `ItemSeparatorComponent` as React Element Pull Request resolved: #32748 Test Plan: ... Reviewed By: lyahdav Differential Revision: D37227719 Pulled By: cortinico fbshipit-source-id: 1c4943fa9d42bf5e61fbd999d1f5be46b51ecb14
- Loading branch information