Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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...



"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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: