From 22c17f9b7a062102c1dcd173416f2d3eea40c385 Mon Sep 17 00:00:00 2001 From: Scotty Simpson Date: Thu, 9 May 2019 06:26:33 -0700 Subject: [PATCH] document DOM binding undefined warning A child's DOM node bound from a parent's empty prop throws a warning. This explains it and shows how to suppress. --- site/content/docs/02-template-syntax.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 917673a7b0..9e509aa735 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -553,6 +553,27 @@ To get a reference to a DOM node, use `bind:this`. ``` +Note that binding a property of a parent component to a child component's DOM node will throw a warning unless the property is assigned a default value: + +```html + + + + + +... + + + + + +``` + +Assign a non-`undefined` value in either component to suppress the warning. ### Component bindings