DEV Community

Discussion on: Text Recorder: React States, Event Handling and Conditional Rendering

Collapse
 
ranaemad profile image
Rana Emad

Because I wanted to record the pauses between each key stroke exactly like it was written. Also, if I just pushed the new characters to the array, I wouldn't be able to maintain their position if the user went back and edited the text mid sentence.