We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b70003e commit 9347501Copy full SHA for 9347501
src/guide/essentials/template-refs.md
@@ -346,3 +346,24 @@ export default {
346
In the above example, a parent referencing this component via template ref will only be able to access `publicData` and `publicMethod`.
347
348
</div>
349
+
350
+<div class="options-api">
351
352
+## Reactivity of Refs {#reactivity-of-refs}
353
354
+Note that `this.$refs` is not reactive. For a reactive ref, you can use `useTemplateRef`:
355
356
+```vue
357
+<script>
358
+export default {
359
+ setup() {
360
+ useTemplateRef('input')
361
+ }
362
+}
363
+</script>
364
365
+<template>
366
+ <input ref="input" />
367
+</template>
368
+```
369
+</div>
0 commit comments