Using fetch states while fetching your data from an API in Nuxt

Опубликовано: 13 Октябрь 2020
на канале: Debbie O'Brien
3,076
93

Fetching data from an API can be done with the fetch hook in Nuxt. We also have access to the state of pending and error of our fetch. This means we can show a message while the dat is fetching and if there is an error. We can also refresh our fetch call without refreshing the page.