7 Matching Annotations
- Jan 2022
-
github.com github.com
-
Oh, I just figured out a workaround for my project, in case it helps someone. If you want the source of truth on the prop to come from the child component, then leave it undefined in the parent. Then, you can make the reactive variable have a condition on the presence of that variable. eg: <script> let prop; $: prop && console.log(prop); </script> <Child bind:prop/> Might not work for every use case but maybe that helps someone.
-
- Jan 2021
-
github.com github.com
-
github.com github.com
- Dec 2020
-
-
Binding In a nutshell, the purpose of this is to update the variable programmatically or when the DOM element/components updates it.
-
-
github.com github.com
-
Interesting, I guess it still does binding (like with bind:prop) even for on:event ...
-
- Sep 2020