From df7ffaf4cb722890ca3159c3839c61552f7195d3 Mon Sep 17 00:00:00 2001 From: polwex Date: Thu, 15 May 2025 04:37:12 +0700 Subject: all working now... --- src/components/counter.tsx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/components/counter.tsx (limited to 'src/components/counter.tsx') diff --git a/src/components/counter.tsx b/src/components/counter.tsx new file mode 100644 index 0000000..0e540b8 --- /dev/null +++ b/src/components/counter.tsx @@ -0,0 +1,21 @@ +'use client'; + +import { useState } from 'react'; + +export const Counter = () => { + const [count, setCount] = useState(0); + + const handleIncrement = () => setCount((c) => c + 1); + + return ( +
+
Count: {count}
+ +
+ ); +}; -- cgit v1.2.3