Last active
September 26, 2018 08:13
-
-
Save olegkalyta/fac0e7311a22af565628056a57e017a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Filter = ({ categories, selectedCategories, toggleCategory }) => ( | |
<View style={{ flex: 1 }}> | |
<FlatList | |
data={categories} | |
extraData={selectedCategories} | |
keyExtractor={i => i.id} | |
renderItem={({ item }) => ( | |
<FilterItem | |
category={item} | |
isShown={!!selectedCategories.find(sc => sc.id === item.id)} | |
key={item.id} | |
onClick={toggleCategory} | |
/> | |
)} | |
/> | |
</View> | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment