Skip to content
Data & APIs · Lesson 01 of 05 · Builds on Watchers

Fetching data in a component

Load a list with fetch() in onMounted(), show loading, error and data, check res.ok before res.json(), and abort the request nobody is waiting for.