Q: problem with state update onChange method in a select form , React Component Im updating a Table component, depending on the value of the Select on a Form, what i want to do is to update the Table immediatly after y choose a selection on my form, what im doing is this
const [value,setValue] = useState(null)
const handleChanges = (e) =>{
    setValue(e.target.value);
    updateTable(value)  // this is not assigned after handleChanges 
    console.log(value) // null      
}
<select onChange={handleChanges}>
   <option> 1 </option> 
   <option> 2 </option>
   <option> 3 </option>
</select>

if someone can help me and explain the better way to solve it.
i solved it  passing the e.target.value instead value, but i feel is not the best option
const handleChanges = (e) =>{
setValue(e.target.value);
updateTable(e.target.value)  // i should use value
console.log(e.target.value) // 1 or 2 or 3 depending on option     

}
