Module 2 · State, effects and live data Lesson 6 of 15
Loading, error and empty states
Every network screen has four states: loading, error, empty and loaded. A fresher portfolio shows only the fourth, and interviewers notice immediately.
Worked example
if (loading) return <Spinner />; if (error) return <ErrorBox message={error} />; if (!items.length) return <EmptyState />; — four lines that turn a demo into something a team could ship.
Your practice task
Switch your phone to flight mode and reload your app, then make sure the error state explains what happened and offers a retry.
Do this before moving on. Reading a solution teaches the shape of it; typing it teaches you.
Key takeaway
Every network screen has four states: loading, error, empty and loaded. A fresher portfolio shows only the fourth, and interviewers notice immediately.
Keep your place in this course
A free account saves which lessons you have finished and unlocks the certificate. The lesson itself stays free to read.
Create free account or sign inCourse complete
You finished every lesson.
Your certificate is ready, and the projects you built are the proof to attach to an application.
Almost there
15 lessons left of 15
Finish every lesson to unlock the certificate. Each one ends in a practice task — do them and the final project brief writes itself.
