Update text.md

I am not a good developer, and I spent a long time trying to figure out the difference between the code with and without the bind. It probably seems clear that I should've figured it out, but adding a statement to show how to invoke the changes might help another person like me. A prompt to type in the DOM could help somebody more quickly pass this level.
pull/8311/head
Mike Randazzo 4 years ago committed by GitHub
parent c9a269c149
commit 5966da6f32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,8 +1,7 @@
--- ---
title: Textarea inputs title: Textarea inputs
--- ---
Similar to the text input in Svelte, a two-way binding will allow the user to update the value variable when information is updated in the textarea in the DOM. Try typing in the textarea, and then use 'bind:value':
The `<textarea>` element behaves similarly to a text input in Svelte — use `bind:value`:
```html ```html
<textarea bind:value={value}></textarea> <textarea bind:value={value}></textarea>
@ -14,4 +13,4 @@ In cases like these, where the names match, we can also use a shorthand form:
<textarea bind:value></textarea> <textarea bind:value></textarea>
``` ```
This applies to all bindings, not just textareas. This applies to all bindings, not just textareas.

Loading…
Cancel
Save