HomeChallengesRepsProblemsLeaderboardTake a challenge

User Dashboard (SPA)

Fetch on mount, handle every state it can be in, and derive the rest. The five things every SPA interview tests.

Advanced40 min on the clock7 graded checks · 100 pointsReact + UI SprintPro
Graded by reading your code against the checklist below.

What you build

  • Fetch /api/users once on mount
  • Render a loading state and an error state, not just the happy path
  • A search box that filters by name, memoised
  • Render the rows with a stable key
  • Show the count of active users, derived rather than stored

Done means

It loads, it fails visibly, it filters without re-computing, and every row has a key.

How it is graded

Published in full, before you start — every point is one of these and there is nothing else.

  1. The fetch runs once, on mount+15Async and its failure modes
  2. Users, loading, error and search are all state+15React state
  3. The filtered list is memoised on the right dependencies+20React performance
  4. Rows are keyed by id+15React state
  5. Loading and error render, not just the data+15Loading and error states
  6. The active count is derived, not stored+10React performance
  7. The request is aborted if the component unmounts+10Async and its failure modes

What it teaches

Async and its failure modesintermediate

Every await can reject; modelling idle, loading, success and error explicitly is what stops a slow network showing a blank screen with no explanation.

The rest of React + UI Sprint