You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
499 B

  1. 'use client';
  2. import { useState } from 'react';
  3. export default function Test() {
  4. console.log('[TEST] mounted');
  5. const [n, setN] = useState(0);
  6. return (
  7. <div style={{ padding: 40, fontSize: 24 }}>
  8. <h1>Hydration test</h1>
  9. <p>Count: {n}</p>
  10. <button
  11. onClick={() => { console.log('[TEST] click'); setN(n + 1); }}
  12. style={{ padding: '10px 20px', background: '#007', color: '#fff', cursor: 'pointer' }}
  13. >
  14. Click me
  15. </button>
  16. </div>
  17. );
  18. }