diff --git a/site/content/tutorial/06-bindings/08-each-block-bindings/app-a/App.svelte b/site/content/tutorial/06-bindings/08-each-block-bindings/app-a/App.svelte new file mode 100644 index 0000000000..6a92e03cca --- /dev/null +++ b/site/content/tutorial/06-bindings/08-each-block-bindings/app-a/App.svelte @@ -0,0 +1,39 @@ + + +

Todos

+ +{#each todos as todo} +
+ + + +
+{/each} + + + + diff --git a/site/content/tutorial/06-bindings/08-each-block-bindings/text.md b/site/content/tutorial/06-bindings/08-each-block-bindings/text.md index 85359d6825..7e50966c32 100644 --- a/site/content/tutorial/06-bindings/08-each-block-bindings/text.md +++ b/site/content/tutorial/06-bindings/08-each-block-bindings/text.md @@ -4,4 +4,16 @@ title: Each block bindings You can even bind to properties inside an `each` block. -TODO \ No newline at end of file +```html + + + +``` + +> Note that interacting with these `` elements will mutate the array. If you prefer to work with immutable data, you should avoid these bindings and use event handlers instead. \ No newline at end of file diff --git a/site/content/tutorial/99-todo/99-todo/text.md b/site/content/tutorial/99-todo/99-todo/text.md index 9b0f6437d3..2b6f1ce7c7 100644 --- a/site/content/tutorial/99-todo/99-todo/text.md +++ b/site/content/tutorial/99-todo/99-todo/text.md @@ -68,7 +68,7 @@ Another one should cover how to set up an editor for syntax highlighting. ## Bindings * [x] Form bindings (input, textarea, select, multiple select) -* [ ] deep/contextual bindings +* [x] deep/contextual bindings * [ ] Dimensions * [ ] `this` * [ ] shorthand