Skip to content

Commit 51b7345

Browse files
1.2 Static Pre Rendering
1 parent ecd793e commit 51b7345

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pages/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
import { useState } from "react";
2+
13
export default function Home() {
4+
const [counter, setCounter] = useState(0);
25
return (
36
<div>
4-
<h1>Hello</h1>
7+
<h1>Hello {counter}</h1>
8+
<button onClick={() => setCounter((prev) => prev + 1)}>+</button>
59
</div>
610
);
711
}

0 commit comments

Comments
 (0)