Symptom
Changing the "Status Filter" dropdown in the sidebar has no visible effect -- the incident list does not change.
Context
The useIncidents hook uses useEffect to fetch incidents and filter them by status. The client (API client) is memoized with useMemo and never changes. The statusFilter state changes when the user selects a new filter.
This exercise simulates the React hook as a plain function to run in the browser sandbox. The bug pattern is the same: the effect dependencies are missing statusFilter, so the filter value is captured once and never updated.
Hints
TypeScript
TypeScript ready
Test Output
▶
Click "Run Tests" to execute your code