From d60f42fc12f2ba5fa94ce41e44b5a5a812a33896 Mon Sep 17 00:00:00 2001 From: Kuba Szymanowski Date: Wed, 7 Jun 2017 10:29:05 +0200 Subject: [PATCH] Update components.md Add note regarding explicit prop declaration requirement --- src/v2/guide/components.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/v2/guide/components.md b/src/v2/guide/components.md index c544bbfdaa..1961cad388 100644 --- a/src/v2/guide/components.md +++ b/src/v2/guide/components.md @@ -696,6 +696,7 @@ Vue.component('my-checkbox', { event: 'change' }, props: { + checked: Boolean, // this allows using the `value` prop for a different purpose value: String }, @@ -717,6 +718,8 @@ The above will be equivalent to: ``` +

Note that you still have to declare the `checked` prop explicitly.

+ ### Non Parent-Child Communication 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: