Skip to content

Commit

Permalink
docs: update ref attribute example (#2991)
Browse files Browse the repository at this point in the history
* docs: update ref attribute example

ref -> useTemplateRef

* fix: add import of useTemplateRef.

vuejs/docs#2991 (comment)
  • Loading branch information
Thy3634 authored and edimitchel committed Oct 14, 2024
1 parent 22bc806 commit daa4d8e
Showing 1 changed file with 2 additions and 2 deletions.
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 @@ Désigne une [ref du template](/guide/essentials/template-refs).

```vue
<script setup>
import { ref } from 'vue'
import { useTemplateRef } from 'vue'
const p = ref()
const pRef = useTemplateRef('p')
</script>
<template>
Expand Down

0 comments on commit daa4d8e

Please sign in to comment.