Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
React Native Stream Group Chat Tutorial: Initialize navigation header
// src/screens/Chat.js
static navigationOptions = ({ navigation }) => {
const { params } = navigation.state;
return {
headerTitle: 'sample-room1',
headerRight: (
<View style={styles.header_right}>
<TouchableOpacity style={styles.header_button_container} onPress={params.showUsersModal}>
<View>
<Text style={styles.header_button_text}>Users</Text>
</View>
</TouchableOpacity>
</View>
),
headerStyle: {
backgroundColor: "#333"
},
headerTitleStyle: {
color: "#FFF"
}
}
}
// next: constructor()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.