Skip to content

Instantly share code, notes, and snippets.

@velotiotech

velotiotech/app.js

Created Jun 26, 2020
Embed
What would you like to do?
export default class CounterApp extends React.Component {
constructor(props) {
super(props);
this.state = { count: 0 };
}
render() {
return (
<div className="App">
<button
onClick={() => {
this.setState({ count: this.state.count + 1 });
}}
>COUNT ({this.state.count})</button>
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment