From 594c7b180589c2b62b86f23085ac640a73f9397d Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Fri, 23 May 2025 14:56:02 +0200 Subject: Add react counter component --- src/components/Counter.jsx | 13 +++++++++++++ src/pages/index.astro | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/components/Counter.jsx (limited to 'src') diff --git a/src/components/Counter.jsx b/src/components/Counter.jsx new file mode 100644 index 0000000..a2ae7c3 --- /dev/null +++ b/src/components/Counter.jsx @@ -0,0 +1,13 @@ +import { useState } from 'react'; + +export default function Counter() { + const [count, setCount] = useState(0); + + return ( +
+ +
+ ); +} diff --git a/src/pages/index.astro b/src/pages/index.astro index 2d14107..ce6dc4e 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,5 +1,5 @@ --- - +import Counter from '../components/Counter'; --- @@ -12,5 +12,6 @@

Astro

+ -- cgit v1.3.1