HomeChallengesRepsProblemsLeaderboardTake a challenge

Sometimes, nothing

<DeliveryNotice> shows for every order that is not delivered — including ones still cooking — and the parent filters the same status again. Render it only for orders that are ready, say "nothing" explicitly, and announce it to screen readers.

Intermediate6 min on the clock5 graded checks · 100 pointsTyped React
Graded by running your code against real cases.

What you build

  • Render the notice only when the order is ready
  • Return null otherwise
  • Remove the status check from the parent
  • Announce the notice with an aria-live region

Done means

The notice appears only for ready orders, the component returns null otherwise, the parent does not check, and it is announced.

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. Shows only for ready orders+30Data flows down
  2. Says "nothing" with null+20Data flows down
  3. The parent does not check the status again+15Data flows down
  4. The return type is JSX.Element | null+15TypeScript basics
  5. The notice is announced to screen readers+20Accessibility

What it teaches

The rest of Typed React