Comment by CharlieDigital
8 days ago
All modern FE frameworks are effectively observer patterns, it's that there are two camps on how those changes in the state are propagated.
In signals-based platforms (Vue, Svelte, Solid), the signal targets specific subscribers and callbacks where the developer has opted in to state changes.
In React, though `useEffect` looks a lot like Vue's `watch`, they behave entirely differently because the entire component is registered as the callback.
The code examples in my second link [1] above are worth a glance because it makes it very obvious how similar these libraries are when glancing at the code, but how different they are in terms of how they deliver update signals.
No comments yet
Contribute on Hacker News ↗