Skip to content

Commit a681541

Browse files
authored
docs: update ref attribute example (#2991)
* docs: update ref attribute example ref -> useTemplateRef * fix: add import of useTemplateRef. #2991 (comment)
1 parent 646093a commit a681541

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/built-in-special-attributes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ Denotes a [template ref](/guide/essentials/template-refs).
5858

5959
```vue
6060
<script setup>
61-
import { ref } from 'vue'
61+
import { useTemplateRef } from 'vue'
6262
63-
const p = ref()
63+
const pRef = useTemplateRef('p')
6464
</script>
6565
6666
<template>

0 commit comments

Comments
 (0)