Back to tasks
Альфа-БанкGet help with live coding in real time with Sobes Copilot
Intern — Senior
45
Разбор поведения при нажатии кнопки
Companies where asked:
Task condition
Определите, как изменится состояние приложения после клика по кнопке.
export default function CounterApp()
let currentCount = 0;
const increment = () => {
currentCount += 1;
}
return (
<div className="App">
<p>'Чтo произойдет при клике по кнопке</p>
<hi>Count = {currentCount}</hi>
<button onClick={increment}-'кнопка</button>
</div>
});