mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
docs: fix code highlighting (#8057)
This commit is contained in:
parent
c404cb1be4
commit
edc44aa064
@ -45,7 +45,7 @@ This composable behaves identically to `useFetch` with the `lazy: true` option s
|
|||||||
|
|
||||||
```vue
|
```vue
|
||||||
<template>
|
<template>
|
||||||
<!-- you'll need to handle a loading state -->
|
<!-- you will need to handle a loading state -->
|
||||||
<div v-if="pending">
|
<div v-if="pending">
|
||||||
Loading ...
|
Loading ...
|
||||||
</div>
|
</div>
|
||||||
@ -59,7 +59,7 @@ This composable behaves identically to `useFetch` with the `lazy: true` option s
|
|||||||
<script setup>
|
<script setup>
|
||||||
const { pending, data: posts } = useLazyFetch('/api/posts')
|
const { pending, data: posts } = useLazyFetch('/api/posts')
|
||||||
watch(posts, (newPosts) => {
|
watch(posts, (newPosts) => {
|
||||||
// Because posts starts out null, you won't have access
|
// Because posts starts out null, you will not have access
|
||||||
// to its contents immediately, but you can watch it.
|
// to its contents immediately, but you can watch it.
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user