Skip to content

Commit

Permalink
docs(vue-query): update example in disabling-queries.md
Browse files Browse the repository at this point in the history
  • Loading branch information
littlehaker authored Dec 13, 2024
1 parent 1eebfc9 commit 8abe056
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/framework/vue/guides/disabling-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ const { isLoading, isError, data, error, refetch, isFetching } = useQuery({
</script>
<template>
<button @click="refetch">Fetch Todos</button>
<span v-if="isIdle">Not ready...</span>
<span v-else-if="isError">Error: {{ error.message }}</span>
<button @click="refetch()">Fetch Todos</button>
<span v-if="isLoading">Loading...</span>
<span v-else-if="isError">Error: {{ error?.message }}</span>
<div v-else-if="data">
<span v-if="isFetching">Fetching...</span>
<ul>
<li v-for="todo in data" :key="todo.id">{{ todo.title }}</li>
</ul>
</div>
<span v-else>Not ready...</span>
</template>
```

Expand Down

0 comments on commit 8abe056

Please sign in to comment.