HomeChallengesRepsProblemsLeaderboardTake a challenge

Container and View

Split a dashboard into the part that decides and the part that draws. The drawing half should be renderable with numbers you made up — that is the test of whether you got it right.

Advanced25 min on the clock5 graded checks · 100 pointsComponents That Fit TogetherPro
Graded by running your code against real cases.

What you build

  • StatCard({ label, value }) and EmptyState({ title })
  • summarise(orders) — the numbers the view needs, as plain data
  • DashboardView({ stats, rows }) — presentational, no state, no idea where the data came from
  • No rows means EmptyState, not an empty list
  • A container default export that derives and hands over

Done means

DashboardView renders correctly from props alone, and holds no state.

How it is graded

Published in full, before you start — every point is one of these and there is nothing else. Each one runs your code; it is not a search for keywords.

  1. StatCard and EmptyState render their props+15Data flows down
  2. summarise turns orders into the numbers+25Container and view
  3. The view renders from made-up props alone+25Container and view
  4. No rows renders the empty state+20Container and view
  5. The view holds no state (read from your source)+15Container and view

What it teaches

The rest of Components That Fit Together