Skip to content

Instantly share code, notes, and snippets.

@codebucks27
Created February 3, 2021 17:05

Revisions

  1. codebucks27 created this gist Feb 3, 2021.
    17 changes: 17 additions & 0 deletions LikesComponent.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    import React, { Component } from "react";
    import HOC from "./HOC";

    class LikesCount extends Component {
    render() {
    return (
    <div>
    {this.props.CountNumber} <br />
    <button onClick={this.props.handleCLick}>Like👍🏻</button>
    </div>
    );
    }
    }

    const EnhancedLikes = HOC(LikesCount, 5);

    export default EnhancedLikes;