Skip to content

Commit

Permalink
link to caveats
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 9, 2023
1 parent bdaf6b9 commit bad77c8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/guide/essentials/reactivity-fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ export default {
<div>{{ count }}</div>
```

Notice that we did **not** need to append `.value` when using the ref in the template. For convenience, refs are automatically unwrapped when used inside templates. You can also mutate a ref directly in event handlers:
Notice that we did **not** need to append `.value` when using the ref in the template. For convenience, refs are automatically unwrapped when used inside templates (with a few [caveats](#caveat-when-unwrapping-in-templates)).

```vue-html
You can also mutate a ref directly in event handlers:

```vue-html{1}
<button @click="count++">
{{ count }}
</button>
Expand Down Expand Up @@ -148,7 +150,7 @@ export default {

Exposed methods can then be used as event handlers:

```vue-html
```vue-html{1}
<button @click="increment">
{{ count }}
</button>
Expand Down

0 comments on commit bad77c8

Please sign in to comment.