Skip to content

Instantly share code, notes, and snippets.

@eldyvoon
Created December 17, 2019 10:16

Revisions

  1. eldyvoon created this gist Dec 17, 2019.
    12 changes: 12 additions & 0 deletions compOne.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    import useCounter from "./useCounter";

    const CompOne = ({ initCounter }) => {
    const [count, increase] = useCounter(initCounter);

    return (
    <div>
    Count: {count}
    <button onClick={increase}>+</button>
    </div>
    );
    };