diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 0e0e8e4008..67be6fe95c 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -762,6 +762,68 @@ To get a reference to a DOM node, use `bind:this`. ``` +#### [{...bind:*property*}](spread_bind_element_property) + +```sv +{...bind:variable} +``` + +--- + +This type of binding works the same as simply using the spread syntax, but gives the advantages of two-way binding. + +A scenario where one would want this would be for passing binds from a parent to a child component (A → B → C). + +```sv + + + + +``` + +```sv + + + + +``` + +```sv + + + +

foo: {foo}; bar: {bar}; baz: {baz}

+``` #### class:*name*