Update 02-template-syntax.md

Removed: > Note that we can't do `{cart.empty}` since `cart` is `undefined` when the button is first rendered and throws an error.

It fixed in 3.16.7
Issue: https://github.com/sveltejs/svelte/issues/4090
pull/7234/head
Misha Rodshtein 5 years ago committed by GitHub
parent eb6fb66f19
commit 0d655c2856
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1427,8 +1427,6 @@ bind:this={component_instance}
Components also support `bind:this`, allowing you to interact with component instances programmatically.
> Note that we can't do `{cart.empty}` since `cart` is `undefined` when the button is first rendered and throws an error.
```sv
<ShoppingCart bind:this={cart}/>

Loading…
Cancel
Save