Posted on

HGGHHHHJV

// src/App.js

import React, { useState } from 'react';
import './App.css';

function App() {
    // State to hold the counter value
    const [counter, setCounter] = useState(0);

    // Function to increment the counter
    const incrementCounter = () => {
        setCounter(counter + 1);
    };

    // Function to decrement the counter
    const decrementCounter = () => {
        setCounter(counter - 1);
    };

    return (
        <div>
            <h1>Counter App</h1>
            <p>Counter: {counter}</p>
            <button>Increment</button>
            <button disabled="{counter">Decrement</button>
        </div>
    );
}

export default App;