Designing All Four
The idea. Any interface that fetches something has four possible states, and an application that only designs the happy one looks broken during exactly the moments a person is most likely to give up on it.
Loading. It is working, and has not finished.
Error. It failed, and here is what to do next.
Empty. It worked and there is genuinely nothing. This is not an error.
Results. The one everybody builds first.
Empty is not error. A search with no matches has succeeded. Telling someone something went wrong when nothing went wrong sends them off to debug their own spelling, or their connection, instead of trying a different word.
An error state without a way forward is a dead end. Give it a retry button. The most common cause of a failed request is a network that has since come back.
Mark this lesson complete
Signed in, your progress follows you to every device.