Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
React Native Stream Group Chat Tutorial: render login screen UI
// src/screens/Login.js
render() {
const { username, is_loading } = this.state;
return (
<View style={styles.wrapper}>
<View style={styles.container}>
<View style={styles.main}>
<View style={styles.field_container}>
<Text style={styles.label}>Enter your username</Text>
onChangeText={username => this.setState({ username })}
{!is_loading && (
<Button title="Login" color="#0064e1" onPress={this.login} />
{is_loading && (
<Text style={styles.loading_text}>Loading...</Text>
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.