score:0

const [value, setValue] = useState(0) <input type="number" value={value} min="0" onChange={(val)=>setValue(val)} required/>

//i think this will work

score:2

handleOnChangeSoda = (event) => {
  setValue(event.target.value)
}

the value set will be a string so if you want it to be a number do a ParseFloat or ParseInt on event.target.value


Related Query

More Query from same tag