Skip to content

Instantly share code, notes, and snippets.

@01Clarian
Created November 30, 2019 20:35
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/267da1c372b1e2153212e8b53e139f39 to your computer and use it in GitHub Desktop.
Save 01Clarian/267da1c372b1e2153212e8b53e139f39 to your computer and use it in GitHub Desktop.
HoverCounter Component Refactored HOC Pattern
import React from 'react';
import EnhanceComponent from './EnhanceComponent'
const HoverCounter = (props) => {
return (
<h2 onMouseOver={props.increment}>
{props.count}</h2>
);
}
export default EnhanceComponent(HoverCounter);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment