Slowly remove all the letters with backspace, with an interval between key stores lying within the debounce duration.
See the this.state.username value being a when the field is empty.
This doesn't affect the fieldProps, so both internal representation and derived props on the <input/> have the proper value, but the one exposed as nextValue points to the a instead of an empty string.
What
nextValue
points to the obsolete (step-back) value of the field when it has a debounced logic withinonChange
handler.Why
Pointer issue.
How
this.state.username
value beinga
when the field is empty.This doesn't affect the
fieldProps
, so both internal representation and derived props on the<input/>
have the proper value, but the one exposed asnextValue
points to thea
instead of an empty string.