We'll setup 3 buttons (All, Active, Complete) to filter the displayed items based on their completion status. We'll also show how to use flexbox flexDirection row lays out items differently than column.
(duplicate post)
If like me you're using a FlatList component instead of a ListView, you'll need to use filterItems on the FlatList data prop:
<FlatList data={filterItems(this.state.filter, this.state.items)}
handleFilter can just be this:
handleFilter (filter) {
this.setState({ filter });
}