mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Port the implementation from pages router to app router. https://github.com/vercel/next.js/blob/27515900b31bfad83c3ecc65ed2e5d020ec289a6/packages/next/src/client/dev/hot-reloader/pages/websocket.ts --------- Co-authored-by: devjiwonchoi <[email protected]> Co-authored-by: JJ Kasper <[email protected]>
17 lines
309 B
JavaScript
17 lines
309 B
JavaScript
'use client'
|
|
|
|
import { useState } from 'react'
|
|
|
|
export function Counter() {
|
|
const [count, setCount] = useState(0)
|
|
|
|
return (
|
|
<div>
|
|
<p id="counter-value">Count: {count}</p>
|
|
<button id="increment-button" onClick={() => setCount(count + 1)}>
|
|
Increment
|
|
</button>
|
|
</div>
|
|
)
|
|
}
|