BuildBot

One Binary, Two Worlds

Talking to the API

Lesson 3 of 5

One typed fetch helper for the whole app, honest loading/error/data states, and optimistic updates that roll back when the server says no.

What you'll learn

  • Write one small typed api<T>() helper instead of scattering raw fetch calls
  • Model server data as three states: loading, error, data
  • Apply an optimistic update, and roll it back when the request fails
Members only

A free account unlocks this lesson and every other one.

Runnable challenges, knowledge checks, and progress that syncs across your devices. No card needed.

Not sure yet? Try the free lesson first: The shape of the app