I'm trying to solve a bug caused by the controlled value props from parent (in some case the cursor jumps to the start of line, in some other cases it rolls back part of the input), since value and defaultValue are both defined in props, so I tried to use defaultValue to get rid of controlling the value state, then... oh shit , this is a trap ! it's worse than a bug !
I'm trying to solve a bug caused by the controlled
valueprops from parent (in some case the cursor jumps to the start of line, in some other cases it rolls back part of the input), sincevalueanddefaultValueare both defined inprops, so I tried to usedefaultValueto get rid of controlling the value state, then... oh shit , this is a trap ! it's worse than a bug !