HackerTrans
TopNewTrendsCommentsPastAskShowJobs

joeldrake

no profile record

comments

joeldrake
·قبل 3 سنوات·discuss
After reading this from rich_harris:

”Basically, you can only modify state _where it's declared_. If you want to allow the 'outside world' to modify that state, you need to expose a function that does so. This is unlike cases where you're passing around an observable object where anyone with a reference, which they need for reading, can also write to it by doing `thing.value += 1`. This is something Solid gets right — you can only change a signal's value if you have a reference to its setter.”

I now realize that this isn’t exactly the same thing as Vues ref of Preacts signal. Maybe its own name is good after all.
joeldrake
·قبل 3 سنوات·discuss
[flagged]
joeldrake
·قبل 3 سنوات·discuss
Yes, and Preact.

Vue also uses ”computed”, but ”ref” instead if signal. It just strikes me that a lot of frameworks seem to implement the same thing (signals) but use different names for it.
joeldrake
·قبل 3 سنوات·discuss
Why not just call it signal and computed? (instead of state and derived)
joeldrake
·قبل 4 سنوات·discuss
Hurray!