A network request goes through several states that the interface must represent: idle, loading, success with data, error, even empty. Modeling them explicitly (for example with a status field) avoids inconsistent combinations and lets you show the right feedback at each step.
Example
const [etat, setEtat] = useState({ status: 'idle', data: null, error: null });