You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to implement custom input using useInput.
The initial value of input come from other context. I try to use 'onChange' to update value of the input but it's not update value as expected.
However It's working if I delay a bit using setTimeout().
What you were expecting: onChange inside useEffect should update value of input.
What happened instead: onChange inside useEffect not update value of input.
I'm trying to implement custom input using
useInput
.The initial value of input come from other context. I try to use 'onChange' to update value of the input but it's not update value as expected.
However It's working if I delay a bit using
setTimeout()
.What you were expecting:
onChange
insideuseEffect
should update value of input.What happened instead:
onChange
insideuseEffect
not update value of input.Steps to reproduce:
Implemented as example code
Related code:
https://codesandbox.io/s/currying-bash-4o68c?file=/src/RandomInput.tsx , try create new Post.
Other information:
Environment
The text was updated successfully, but these errors were encountered: