next.js/test/e2e/app-dir/app-css/app/client-nested/layout.js
layout.js21 lines449 B
'use client'

import { useState, useEffect } from 'react'

import styles from './style.module.css'
import './style.css'

export default function ClientNestedLayout({ children }) {
  const [count, setCount] = useState(0)
  useEffect(() => {
    setCount(1)
  }, [])
  return (
    <>
      <h1 className={styles.red}>Client Nested. Count: {count}</h1>
      <button onClick={() => setCount(count + 1)}>{count}</button>
      {children}
    </>
  )
}
Quest for Codev2.0.0
/
SIGN IN