Last active
May 25, 2018 07:30
-
-
Save jrwebdev/b7ab90bb1f064feece998591bcb09e8a 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
| import makeCounter, { InjectedCounterProps } from './makeCounter'; | |
| interface CounterProps extends InjectedCounterProps { | |
| style?: React.CSSProperties; | |
| } | |
| const Counter = (props: CounterProps) => ( | |
| <div style={props.style}> | |
| <button onClick={props.onDecrement}> - </button> | |
| {props.value} | |
| <button onClick={props.onIncrement}> + </button> | |
| </div> | |
| ); | |
| export default makeCounter(Counter); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment