1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-31 14:28:04 +00:00
_/wmr/public/pages/home/index.js

25 lines
615 B
JavaScript
Raw Normal View History

2021-04-20 19:11:14 +09:00
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>
</>
);
}