next.js/test/development/app-hmr/fixtures/default-template/app/counter.js
counter.js17 lines309 B
'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>
  )
}
Quest for Codev2.0.0
/
SIGN IN