Skip to content

Instantly share code, notes, and snippets.

@kaueDM
Created September 27, 2017 19:00
Show Gist options
  • Save kaueDM/0c132c20bb76e1721f81a3a35c39becb to your computer and use it in GitHub Desktop.
Save kaueDM/0c132c20bb76e1721f81a3a35c39becb to your computer and use it in GitHub Desktop.
//Home.js
<Tab heading="TAREFAS"
tabStyle={{ backgroundColor: BLUE }}
textStyle={{ color: WHITE }}
activeTabStyle={{ backgroundColor: BLUE }}
activeTextStyle={{ color: WHITE, fontWeight: '900' }}
>
<TaskList navigate={this.props.navigation.navigate} />
</Tab>
//TaskList.js
render() {
return (
<View>
<FlatList
style={{ marginTop: 10 }}
data={this.props.taskList}
keyExtractor={item => item.uid}
renderItem={({ item }) => (
<Task item={item} navigate={this.props.navigate} />
)}
refreshing={this.props.refreshing}
onRefresh={() => this.sync(this.props.taskList, this.props.user.uid)}
/>
</View>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment