Skip to content

Instantly share code, notes, and snippets.

@lmiller1990
Created April 18, 2018 14:53
Show Gist options
  • Save lmiller1990/34950c965f74d55b8e2f674264bf7117 to your computer and use it in GitHub Desktop.
Save lmiller1990/34950c965f74d55b8e2f674264bf7117 to your computer and use it in GitHub Desktop.
export default class Events extends React.Component {
constructor() {
/* no change */
}
handle(e) {
const evt = e
this.setState({ count: this.state.count + 1 })
console.log(`Event: `, evt)
}
render() {
return (
<View
onInput={e => this.handle(e)}
style={styles.view}
>
<Text>
{this.state.count}
</Text>
</View>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment