⚡AgentSkills
🎨 Frontend Engineering · React Patterns

Design error, loading, and empty states first

Treat non-happy paths as features: skeleton loaders, typed errors, retry affordances, useful empties.

foundation~20 minFrontend EngineersFull-Stack DevelopersDesign Engineers

Steps

  1. 1For every data section, spec loading, error, empty, and partial states upfront
  2. 2Use skeletons matching final layout to avoid shift on load
  3. 3Differentiate recoverable errors (retry button) from fatal ones (support link)
  4. 4Write empty states as invitations: what this shows + how to populate it
  5. 5Surface partial failures inline instead of failing the whole page
  6. 6Add boundary components at route and widget level, logging with context

Common Pitfalls

  • ▲Infinite spinner hiding a thrown error
  • ▲Empty tables with zero guidance

Commands

Install with skills CLI
$ npx skills add aniruddhaadak80/skills --skill react-patterns-error-loading-states
Install globally
$ npx skills add aniruddhaadak80/skills --skill react-patterns-error-loading-states -g

Tags

#ux#resilience#frontend-engineering#react-patterns

Related skills

Decide what renders on the server versus client in React Server Components to minimize JavaScript shipped.

🎨 Frontend Engineering·~30m

Choose between local state, lifted state, URL state, and stores by asking who needs the data and when.

🎨 Frontend Engineering·~25m