Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/api/built-in-special-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@

```vue
<script setup>
import { ref } from 'vue'
import { useTemplateRef } from 'vue'

const p = ref()
const pRef = useTemplateRef('p')
</script>

<template>
Expand Down
2 changes: 2 additions & 0 deletions src/guide/essentials/template-refs.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ onMounted(() => console.log(itemRefs.value))
<details>
<summary>3.5 以前の使用方法</summary>

In versions before 3.5 where `useTemplateRef()` was not introduced, we need to declare a ref with a name that matches the template ref attribute's value. The ref should also contain an array value:

```vue
<script setup>
import { ref, onMounted } from 'vue'
Expand Down