Created
April 18, 2018 14:53
-
-
Save lmiller1990/34950c965f74d55b8e2f674264bf7117 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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