React Hooks companion: useState vs useEffect without the confusion
Read this after lesson two, before building your first data-fetching component.
TL;DR
useState stores UI memory; useEffect synchronizes with the outside world (fetch, timers, subscriptions). If you are storing fetched data, you usually need both.
Open the matchinginteractive tutorialand keep this article beside you — alternate reading and typing.
Minimal pattern students should memorize