Lesson 30 of 30
'Just call fetch' stops being just calling fetch the moment a real app has more than a handful of data-dependent features — the accumulated weight of loading states, errors, caching, and auth IS the data layer, whether anyone designed it as one or not.
12 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A codebase has no dedicated data-fetching library and no shared wrapper — every component calls fetch directly, however its author preferred. What does this lesson argue is actually true about that codebase's data layer?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
Picture a codebase where every component that needs data reaches for whatever felt convenient at the time it was written: one component calls a raw fetch directly, another wraps it slightly differently, a third pulls in a data-fetching library nobody else on the team uses. Each individual decision was reasonable in isolation. The accumulated result isn't.
Treating every data-fetching call site as its own independent decision produces a real, compounding cost, not a theoretical one:
Every lesson in this track was really answering one piece of a single larger question: what does this app's data layer do, consistently, everywhere?
None of those are framework features. They're architectural decisions — the kind normally reserved for "how do we structure our components" or "how do we manage state" — applied to data fetching instead. A team that makes them once, deliberately, and applies the answer everywhere ends up with genuinely less code and far fewer categories of bug than a team that lets each new feature reinvent its own answer.
"How would you structure data fetching across a large application?" is a real, senior-leaning question, and the answer that actually lands is naming the recurring decisions — loading/error consistency, auth attachment, caching and invalidation — as one coherent architectural choice made once, rather than describing a library name as if picking a tool were the whole answer.