Hacker News new | ask | show | jobs
by llanowarelves 1290 days ago
I know you're probably asking it only rhetorically, but it's the way to mark something as reactive for the Svelte "compiler", cleverly using the existing JS label syntax.[1]

[1]https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

1 comments

"cleverly"
It is clever. It’s just a named label with the name “$”. It’s perfectly standard JavaScript, and it’s super easy to remember.
I like how jquery used $ to namespace all methods and now svelte does not repeat, but rhymes.