Skip to content

Commit be8179d

Browse files
seeniolabodecs-vuejs-org
authored andcommitted
docs: improve clarity on using refs (#3051)
1 parent a864471 commit be8179d

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
@@ -142,6 +142,8 @@ onMounted(() => console.log(itemRefs.value))
142142
<details>
143143
<summary>Použití před verzí 3.5</summary>
144144

145+
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:
146+
145147
```vue
146148
<script setup>
147149
import { ref, onMounted } from 'vue'

0 commit comments

Comments
 (0)