SpinTheMic
Pro

Interview practice question

Input values jump between list items after deleting one

Frontend Engineering · React · Intermediate

After deleting an item from a list of editable rows, the text in the input fields appears in the wrong rows. What's wrong?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Index used as key.
  • React reuses component state by key position.
  • Use stable IDs.
  • Uncontrolled inputs especially affected.
  • Generate IDs on creation.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics