|
|
|
|
|
by Tade0
1018 days ago
|
|
> How does this ever get invoked? Initially the same way it would without the $: { ... } wrapper - that is true both for Svelte and vanilla JavaScript. > Does it get invoked only when `count` changes? It's invoked whenever a named variable that is mentioned in the block is explicitly assigned to. That's the whole "magic" here really. It's "just" JS in the sense that there's no additional syntax introduced that would make it incompatible with any of the available JS parsers, so by extension TS parsers as well. |
|
> It's invoked whenever a named variable that is mentioned in the block is explicitly assigned to.
This makes sense in the sense that it's a contract that I can accept and use, but it does imply the existence of a parsing pipeline & runtime of unknown (to me) complexity & capabilities -- exactly the sort of thing a prospective user of the framework would need to learn about sooner or later.