Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
llanowarelves
on Dec 2, 2022
|
parent
|
context
|
favorite
| on:
Migrating from Vue 2 to Svelte
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...
tills13
on Dec 2, 2022
[–]
"cleverly"
doctor_eval
on Dec 2, 2022
|
parent
[–]
It is clever. It’s just a named label with the name “$”. It’s perfectly standard JavaScript, and it’s super easy to remember.
mejutoco
on Dec 2, 2022
|
root
|
parent
[–]
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:
[1]https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...