Conditional Rendering

Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.

The problem

  • easy
  • Pro

A shopping cart component should show a loading message, an error, an empty-cart message, or the list of items. A colleague's version sometimes shows a stray zero on the page. Explain how you'd render each case, and where the zero comes from.

Talk this problem through with an AI coach

This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.

Start free →