Skip to content

Instantly share code, notes, and snippets.

@hyperh
Last active November 5, 2017 22:33
Show Gist options
  • Save hyperh/a076651a042bc4407b8e7b95bbe73cf6 to your computer and use it in GitHub Desktop.
Save hyperh/a076651a042bc4407b8e7b95bbe73cf6 to your computer and use it in GitHub Desktop.
export default class appiumTutorial extends Component {
state = {
counter: 0
}
onPress = () => this.setState({ counter: this.state.counter + 1 })
render() {
return (
<View style={styles.container} accessibilityLabel="testview">
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<Text style={styles.instructions}>
To get started, edit index.android.js
</Text>
<Text style={styles.instructions}>
Double tap R on your keyboard to reload,{'\n'}
Shake or press menu button for dev menu
</Text>
<Text accessibilityLabel="counter">{this.state.counter}</Text>
<Button onPress={this.onPress} title="Press me" accessibilityLabel="button" />
</View>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment