[docs] A reference of the field variable is missing in the sidebar (#6815)

pull/6974/head
Fabrizio Calderan 3 years ago committed by GitHub
parent 6ff1aed8d5
commit 2c7986034d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,9 +2,13 @@
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 `<InputField>` to a prop named `field` in the same way we did when binding DOM Elements
Just as you can bind to DOM elements, you can bind to component instances themselves. For example, we can bind the instance of `<InputField>` to a variable named `field` in the same way we did when binding DOM Elements
```html
<script>
let field;
</script>
<InputField bind:this={field} />
```

Loading…
Cancel
Save