Skip to content

Commit 7e38b9d

Browse files
KKSzymanowskichrisvfritz
authored andcommitted
Add note regarding explicit prop declaration requirement (vuejs#939)
Add note regarding explicit prop declaration requirement
1 parent 5a6859d commit 7e38b9d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/v2/guide/components.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@ Vue.component('my-checkbox', {
696696
event: 'change'
697697
},
698698
props: {
699+
checked: Boolean,
699700
// this allows using the `value` prop for a different purpose
700701
value: String
701702
},
@@ -717,6 +718,8 @@ The above will be equivalent to:
717718
</my-checkbox>
718719
```
719720

721+
<p class="tip">Note that you still have to declare the `checked` prop explicitly.</p>
722+
720723
### Non Parent-Child Communication
721724

722725
Sometimes two components may need to communicate with one-another but they are not parent/child to each other. In simple scenarios, you can use an empty Vue instance as a central event bus:

0 commit comments

Comments
 (0)