From 84f8a760c25f5376fe435605e4418a590b20c478 Mon Sep 17 00:00:00 2001 From: Fabrizio Calderan Date: Thu, 7 Oct 2021 16:08:45 +0200 Subject: [PATCH] A reference of the field variable is missing If I just add the code on the sidebar the console says that the field variable is undefined, so I've included a reference with the variable in the initial code block --- site/content/tutorial/06-bindings/14-component-this/text.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/site/content/tutorial/06-bindings/14-component-this/text.md b/site/content/tutorial/06-bindings/14-component-this/text.md index 00af193604..a270c79006 100644 --- a/site/content/tutorial/06-bindings/14-component-this/text.md +++ b/site/content/tutorial/06-bindings/14-component-this/text.md @@ -5,6 +5,10 @@ title: Binding to component instances Just as you can bind to DOM elements, you can bind to component instances themselves. For example, we can bind the instance of `` to a prop named `field` in the same way we did when binding DOM Elements ```html + + ``` @@ -16,4 +20,4 @@ Now we can programmatically interact with this component using `field`. ``` -> Note that we can't do `{field.focus}` since field is undefined when the button is first rendered and throws an error. \ No newline at end of file +> Note that we can't do `{field.focus}` since field is undefined when the button is first rendered and throws an error.