Skip to content

Commit 96b9b7c

Browse files
authored
docs: improve clarity on using refs (vuejs#3051)
1 parent 08feb34 commit 96b9b7c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/guide/essentials/template-refs.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ onMounted(() => console.log(itemRefs.value))
148148
<details>
149149
<summary>Usage before 3.5</summary>
150150

151+
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:
152+
151153
```vue
152154
<script setup>
153155
import { ref, onMounted } from 'vue'

0 commit comments

Comments
 (0)