Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ClickCounter refactored for HOC pattern
import React from 'react';
import EnhanceComponent from './EnhanceComponent';
const ClickCounter = (props) => {
return (
<button onClick={props.increment}>
{props.count}</button>
);
}
export default EnhanceComponent(ClickCounter);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment