Support elements for header/footer

Summary: It can be much more convenient instead of binding and setting `extraData` or what-not.

Reviewed By: blairvanderhoof

Differential Revision: D4829165

fbshipit-source-id: bb781fedc831059e7b5065ea4357955aed79beda
This commit is contained in:
Spencer Ahrens
2017-04-07 00:48:52 -07:00
committed by Facebook Github Bot
parent f72d9dd08b
commit 1b52c2a7ab
5 changed files with 19 additions and 11 deletions

View File

@@ -127,7 +127,7 @@ class FlatListExample extends React.PureComponent {
<SeparatorComponent />
<AnimatedFlatList
ItemSeparatorComponent={SeparatorComponent}
ListHeaderComponent={HeaderComponent}
ListHeaderComponent={<HeaderComponent />}
ListFooterComponent={FooterComponent}
data={filteredData}
debug={this.state.debug}