Live data from Hacker News

State-based vs Signal-based rendering

jovidecroock.com

61–64 of 64 posts

Re: State-based vs Signal-based rendering

#61
post #57

Earlier quoted context omitted.

have you tried svelte 3/4?

Svelte: let doubled = $derived(count * 2); React: const doubled = count * 2

React is the most inefficient in terms of performance (after imgui); it recomputes everything on every event like mousemove. It was probably made for simple forms with tens of variables.

Re: State-based vs Signal-based rendering

#62
post #57

Earlier quoted context omitted.

have you tried svelte 3/4?

Svelte: let doubled = $derived(count * 2); React: const doubled = count * 2

I explicitly said svelte 3 and 4, while runes have they pro and I appreciate them, svelte was terser before.

Re: State-based vs Signal-based rendering

#63
post #62

Earlier quoted context omitted.

Svelte: let doubled = $derived(count * 2); React: const doubled = count * 2

I explicitly said svelte 3 and 4, while runes have they pro and I appreciate them, svelte was terser before.

Oh sry, I thought Svelte introduced runes in v4, not 5.

I find it pointless to argue about old versions of Svelte and Vue, when their drawbacks have already been addressed by their own creators [^1].

[^1]: https://svelte.dev/blog/svelte-5-is-alive

Re: State-based vs Signal-based rendering

#64
post #6

Are Angular signals the same as Preact signals?

I can't say as I'm not familiar with Preact signals, but I do know the Angular team brought on the author of SolidJS to implement signals in Angular. Though I think I remember reading at some point that Preact signals were essentially directly ported from SolidJS, so they're likely similar if nothing else. (Someone correct me if I'm wrong)

Neither of those things are true to my knowledge... I can find absolutely no evidence of Ryan Carniato being involved with Angular Signals (nor did I hear anything whilst they were being developed) and Preact Signals certainly weren't a port of Solid. Same name but internals share nothing and if anything, Preact's signals most closely resemble Vue's refs in API (though completely different internals -- there was no porting).
Post reply on HN