Skip to content

Instantly share code, notes, and snippets.

@jrwebdev
Last active May 25, 2018 07:30
Show Gist options
  • Select an option

  • Save jrwebdev/b7ab90bb1f064feece998591bcb09e8a to your computer and use it in GitHub Desktop.

Select an option

Save jrwebdev/b7ab90bb1f064feece998591bcb09e8a to your computer and use it in GitHub Desktop.
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