Skip to main content
Debug React
All scenarios

React debugging exercise

The order list forgets its filter

about 20 minLevel: IntermediateTopics: effectstimers

An order list that refreshes itself shows the chosen status at first, then orders of every status a few seconds later. Find out why the refresh ignores the filter and fix it.

What you’ll practice: useEffect, setInterval, polling, data fetching

Bug report

The warehouse team keeps the order dashboard open all day. It refreshes itself every few seconds, so new orders show up without reloading, and most people filter it to one status, such as Packed, to see what is ready to ship.

They report that the filter does not stick. The list shows the right orders at first, but a few seconds later orders of every status are back, while the filter still shows their choice. Refresh now puts it right, until the list refreshes itself again.

Reproduce the issue, identify the cause, and make the smallest reliable fix. The list must keep refreshing itself, and switching auto-refresh off must still stop it.

Be ready to explain why the list changes back and how you verified your change.

Included in Full accessThis and 4 more scenarios, plus every new one

$14.50then $29paid once

Get Full access

Not sure yet? Try a free one first: Editing one row changes another

No account. Your practice stays in this browser.

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.