Skip to content

Commit 6994b63

Browse files
authored
Update useFetch and useAsyncData snippet
Replace 'pending' with 'status' and add 'clear' function
1 parent 5371dae commit 6994b63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

snippets/Nuxt/composables.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"useAsyncData": {
88
"prefix": "useAsyncData",
99
"body": [
10-
"const { data, pending, error, refresh } = await useAsyncData(",
10+
"const { data, status, error, refresh, clear } = await useAsyncData(",
1111
" '$2',",
1212
" () => \\$fetch('$3')",
1313
");"
@@ -37,7 +37,7 @@
3737
"useFetch": {
3838
"prefix": "useFetch",
3939
"body": [
40-
"const { data, pending, error, refresh } = await useFetch('$1',{",
40+
"const { data, status, error, refresh, clear } = await useFetch('$1',{",
4141
" $2",
4242
"})"
4343
],

0 commit comments

Comments
 (0)