In this example:
components/Mountains.vue which uses the
fetch hook and the
$http module to fetch our data at component level while
pages/mountains/_slug fetches the data at page level and include:
$fetchState.pendingto show a loading text when the data is loading.
$fetchState.errorto show an error message when we can't retrieve the data.
$fetchto fetch the data again when clicked.