Skip to content

Commit

Permalink
docs: improve clarity on using refs (#3051)
Browse files Browse the repository at this point in the history
  • Loading branch information
seeniOlabode authored and edimitchel committed Oct 14, 2024
1 parent 952658b commit 22bc806
Showing 1 changed file with 2 additions and 0 deletions.
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>Utilisation avant 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

0 comments on commit 22bc806

Please sign in to comment.