StoicBuilder
Later missionMission 20: Four states of one feedYou can practise it now. It counts once you reach mission 20, after “Look at the real rows”.Back to HQ
Exit lesson
Empty, loading and error statesProLesson 16 of 45, about 6 min
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
0 XP

The app: Chirp

NetworkSigned in as
ChirpHome
Maya’s feed
TTheo Lindqvist@theoships, 2m

Dark mode is live. Be gentle.

0
AAna Ruiz@anaruiz, 1h

Calligraphy club moved to Sunday mornings.

0
MMaya Okafor@mayabuilds, 3h

Shipped the notes page tonight.

0

The data behind it

Feed.jsx your agent’s first versiondraws posts, nothing else
1function Feed() {2 const { status, posts, error } = useFeed();3 return (4 <ul>5 {posts.map((p) => <Post key={p.id} post={p} />)}6 </ul>7 );8}
feed state what the screen is drawn from3 posts
{ "status": , "error": null, "posts": [ { "id": 41, "author": "theoships", "text": "Dark mode is live. Be gentle." }, { "id": 40, "author": "anaruiz", "text": "Calligraphy club moved to Sunday mornings." }, { "id": 39, "author": "mayabuilds", "text": "Shipped the notes page tonight." } ] }
Network what the app asked for
GET /api/feed
200 OK after 0.9 s: 3 posts

The MagisterLeft: Chirp’s home feed, as your agent first built it. Right: the code that draws it, and the state it draws from. status names the situation the feed is in. Right now it’s "ready": the posts have arrived. Tap it.

Step 1 of 7Tap the status the feed is drawn from
  • Tap status in the feed state

You’re not signed in, so this lesson won’t be saved to your path. Sign in free to keep your XP.