Skip to main content
Debug React
All scenarios

React debugging exercise

Editing one row changes another

about 20 minLevel: FoundationalTopics: renderingstate

Unsaved notes in a task list jump to the wrong task after sorting, filtering, or deleting. Find out why and keep each draft with its task.

What you’ll practice: useState, useMemo, rendering lists, sorting and filtering

Bug report

Team members write a note on a task, then sort or filter the list before saving. Their unsaved note sometimes shows up on a different task, and saving puts it on the wrong one.

Support has also seen a note disappear after someone hides completed tasks, and reappear on another task after a delete.

Reproduce the issue, identify the cause, and make the smallest reliable fix. Sorting, filtering, completing, and deleting tasks must keep working.

Be ready to explain why the note moves and how you verified your change.

Practice this scenario

After you finish your fix, you can review a proposed fix for the same bug.

No account needed. Your attempts, code and answers stay in this browser. How storage works (opens in a new tab)

How it works

  1. Reproduce and fix

    Each scenario is a small app with one real bug. Reproduce it in the live preview, find the cause, and make the smallest fix. Five checks confirm the behavior.

  2. Explain your reasoning

    Answer four short questions: what caused it, what you changed, what you ruled out, and how you verified it.

  3. Review another fix

    Judge a proposed fix for the same bug, approve it or request changes, then see how the checks treat it.