import React from 'react'; // Tip: Importa useState aquí arriba export default function Contador() { // 1. Crea tu estado aquí return ( <div style={{ padding: '20px', textAlign: 'center', fontFamily: 'sans-serif' }}> <h1>Contador: { /* 2. Muestra el estado aquí */ }</h1> {/* 3. Agrega el botón con su evento onClick */} <button>Incrementar</button> </div> ); }
Terminal
ReadyWaiting for execution...