React/カウンター

Counter.js
impor React, { useState } from "react";

const Counter = () => {
    const [count, setCount] = useState(0);
    const onCountUp = () => {
        setCount(count + 1);
    }
    const onCountDown = () => {
        setCount(count - 1);
    }

    return(
        <>
            count: {count}
            button onClick={onCountUp}>UP/button>
            button onClick={onCountDown}>DOWN/button>
        
    );
}

export defaul Button;

    
App.js
import React from "react";
import Button from "components/Counter";

const App = () => {
    <>
        Counter />
    
}
export default App;