Skip to content

Commit 1350d08

Browse files
authored
fix: initial value of template refs in Options API (#2587)
1 parent e88e878 commit 1350d08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/guide/essentials/template-refs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default {
6767

6868
</div>
6969

70-
Note that you can only access the ref **after the component is mounted.** If you try to access <span class="options-api">`$refs.input`</span><span class="composition-api">`input`</span> in a template expression, it will be `null` on the first render. This is because the element doesn't exist until after the first render!
70+
Note that you can only access the ref **after the component is mounted.** If you try to access <span class="options-api">`$refs.input`</span><span class="composition-api">`input`</span> in a template expression, it will be <span class="options-api">`undefined`</span><span class="composition-api">`null`</span> on the first render. This is because the element doesn't exist until after the first render!
7171

7272
<div class="composition-api">
7373

0 commit comments

Comments
 (0)