Created
November 17, 2017 04:23
-
-
Save dceddia/128073c4456bd6ecf6708f16d8a3b2f9 to your computer and use it in GitHub Desktop.
With state removed
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
import React from 'react'; | |
class Counter extends React.Component { | |
increment = () => { | |
// fill in later | |
} | |
decrement = () => { | |
// fill in later | |
} | |
render() { | |
return ( | |
<div> | |
<h2>Counter</h2> | |
<div> | |
<button onClick={this.decrement}>-</button> | |
<span>{this.props.count}</span> | |
<button onClick={this.increment}>+</button> | |
</div> | |
</div> | |
) | |
} | |
} | |
export default Counter; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment