var [broj, setBroj] = useState(0);
function plus() {
setBroj(broj++)
}
function minus() {
setBroj(broj--)
}
return (<div>
<button onClick={plus}>+</button>
<h3>{broj}</h3>
<button onClick={minus}>-</button>
</div>
)
when i click first time nothing just after second time work every 2 time ( onclick ) work