Skip to content

Instantly share code, notes, and snippets.

@rafaellucio
Last active December 5, 2017 00:48
Show Gist options
  • Save rafaellucio/315751bd0d0baf140f67f017414234ca to your computer and use it in GitHub Desktop.
Save rafaellucio/315751bd0d0baf140f67f017414234ca to your computer and use it in GitHub Desktop.
import React, { Component } from 'react'
export default class Counter extends Component {
increment = () => {
// preencher depois
}
decrement = () => {
// preencher depois
}
render() {
return (
<div>
<h2>Counter</h2>
<div>
<button onClick={this.decrement}>-</button>
<span>{this.props.count}</span>
<button onClick={this.increment}>+</button>
</div>
</div>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment