2 ms·
For what it's worth, Svelte https://svelte.dev/ https://svelte.dev/ is a Javascript-to-javascript compiler that adds reactive statements to the language (by usi
by yencabulator 4y ago
For what it's worth, Svelte https://svelte.dev/ https://svelte.dev/ is a Javascript-to-javascript compiler that adds reactive statements to the language (by using the $ label):
$: b = a + 1
Since it's a compiler, it knows what inputs were used in that statement, and what outputs were mutated. The statement is re-run every time its inputs change.
This is then used to make a web development environment where "react to input changing" is much more natural than with e.g. React.