Intermedio
19 agosto 2026

Trova il bug: React / Next.js

Uno snippet di codice. Trova il bug, o dimostra che non ce n'è.

tsx
1import { useState } from 'react'
2
3function Stepper() {
4  const [count, setCount] = useState(0)
5
6  const incrementBy3 = () => {
7    setCount(count + 1)
8    setCount(count + 1)
9    setCount(count + 1)
10  }
11
12  return (
13    <div>
14      <p>Count: {count}</p>
15      <button onClick={incrementBy3}>+3</button>
16    </div>
17  )
18}

Clicca sulle righe che causano il problema.

Il tuo verdetto

Un tentativo al giorno. La risposta appare subito dopo.

Mantieni la tua serie

Crea un account per conservare la tua serie e seguire i tuoi progressi.

Crea un account