Loading lesson…
Level 1 · Apprentice0 XP
Stop hand-writing loading states. Let a query cache own server data.
Step 1 / 5
ProblemEach screen fetches the profile again, shows its own spinner and forgets the result when you go back. On a weak mobile network it feels broken.
← → step
Before this: Accessibility and languages on mobile
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Add TanStack Query to a screen that fetches a list. Show cached data instantly when you come back to the screen, and after a mutation call invalidateQueries so the list refreshes by itself.