() => { const [count, setCount] = React.useState(0); return ( <div className="flex items-center justify-center h-screen"> <div className="border-2 border-gray-300 p-8 rounded-lg"> <div className="border-2 border-blue-300 p-6 rounded-lg"> <h1 className="text-xl font-bold mb-4">Counter: {count}</h1> <button className="bg-blue-500 text-white py-2 px-4 rounded hover:bg-blue-600" onClick={() => setCount(count + 1)} > Increase Counter </button> </div> </div> </div> ); };
() => { const [count, setCount] = React.useState(0); return ( <div className="flex items-center justify-center h-screen"> <div className="border-2 border-gray-300 p-8 rounded-lg"> <div className="border-2 border-blue-300 p-6 rounded-lg"> <h1 className="text-xl font-bold mb-4">Counter: {count}</h1> <button className="bg-blue-500 text-white py-2 px-4 rounded hover:bg-blue-600" onClick={() => setCount(count + 1)} > Increase Counter </button> </div> </div> </div> ); };