mirror of
https://github.com/kou029w/_.git
synced 2025-01-31 06:18:07 +00:00
24 lines
615 B
JavaScript
24 lines
615 B
JavaScript
import styles from "./style.module.css";
|
|
import { useState } from "preact/hooks";
|
|
|
|
export default function Home() {
|
|
const [count, setCount] = useState(0);
|
|
|
|
return (
|
|
<>
|
|
<section class={styles.home}>
|
|
<h1>Home</h1>
|
|
<p>This is the home page.</p>
|
|
<>
|
|
<button style={{ width: 30 }} onClick={() => setCount(count - 1)}>
|
|
-
|
|
</button>
|
|
<output style={{ padding: 10 }}>Count: {count}</output>
|
|
<button style={{ width: 30 }} onClick={() => setCount(count + 1)}>
|
|
+
|
|
</button>
|
|
</>
|
|
</section>
|
|
</>
|
|
);
|
|
}
|