Bug: Exception using both input and useState #24414
Labels
Resolution: Expected Behavior
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
Reproduction link
Steps to reproduce
Use
const [val, setVal] = useState("");
to bind the input value After calling thesetVal
method in theonChange
callback, theval
value cannot be obtained by printing the latest valueThe value obtained is the last modified value
What is expected?
Expect to get the latest
val
aftersetVal()
What is actually happening?
But you can only get the value of the previous modification
The text was updated successfully, but these errors were encountered: