Skip to content

Commit bc677c3

Browse files
Apply suggestions from code review
Co-Authored-By: yyx990803 <yyx990803@gmail.com>
1 parent fe5eb5a commit bc677c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

active-rfcs/0000-slot-syntax-shorthand.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ In Vue we currently provide shorthands only for two directives: `v-bind` and `v-
3535
<div v-bind:id="id"></div>
3636
<div :id="id"></div>
3737

38-
<button v-on:click="onClick"></div>
39-
<button @click="onClick"></div>
38+
<button v-on:click="onClick"></button>
39+
<button @click="onClick"></button>
4040
```
4141

4242
`v-bind` and `v-on` often get used repeatedly on the same element, and can get verbose when the information differing between each is **the directive argument** instead of the directive itself. **Shorthands thus help improve the signal/noise ratio by shortening the parts that are duplicated (`v-xxx`) and highlighting the parts that are different (the arguments).**

0 commit comments

Comments
 (0)