Prefer using event.target.value in an onChange callback and a state to store the data.
event.target.value
onChange