Skip to content

Instantly share code, notes, and snippets.

@lmiller1990
Created April 18, 2018 14:52
Show Gist options
  • Save lmiller1990/04c46014a95be0499b21ec67a3c4d7fd to your computer and use it in GitHub Desktop.
Save lmiller1990/04c46014a95be0499b21ec67a3c4d7fd to your computer and use it in GitHub Desktop.
// ... imports and stylesheet
export default class Events extends React.Component {
constructor() {
super()
this.state = { count: 0 }
}
render() {
return (
<View
onMove={() => this.setState({ count: this.state.count + 1 })}
style={styles.view}
>
<Text>
{this.state.count}
</Text>
</View>
);
}
};
AppRegistry.registerComponent('Events', () => Events);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment