Skip to content

Instantly share code, notes, and snippets.

@codebucks27
Created February 3, 2021 17:13
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 codebucks27/50801170e74be48ed65c9b7d3a67ca5c to your computer and use it in GitHub Desktop.
Save codebucks27/50801170e74be48ed65c9b7d3a67ca5c to your computer and use it in GitHub Desktop.
import React, { Component } from "react";
import HOC from "./HOC";
class CommentsCount extends Component {
render() {
return (
<div>
Total Comments : {this.props.CountNumber} <br />
<button onClick={this.props.handleCLick}>Add Comment!</button>
</div>
);
}
}
const EnhancedComments = HOC(CommentsCount, 10);
export default EnhancedComments;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment