Skip to content

Instantly share code, notes, and snippets.

@01Clarian
Created November 30, 2019 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 01Clarian/63d958c368b2dfbb83336cda07489fda to your computer and use it in GitHub Desktop.
Save 01Clarian/63d958c368b2dfbb83336cda07489fda to your computer and use it in GitHub Desktop.
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