import React from "react";

function Counter() {
    const [likes, setLikes] = useState(0);

    function incrementLike() {
        setLikes(likes + 1);
    }
    
    function decrementLike() {
        setLikes(likes - 1);
    }

    return(
        <div>
            <h1>{likes}</h1>
            <button onClick={incrementLike}>Increment</button>
            <button onClick={decrementLike}>Decrement</button>
        </div>
    );
}

export default Counter;