Get the latest tech news
Poor man's signals – tiny vanilla JavaScript signals implementation
Signals are all the rage over in frameworkland, so let's bring them to vanilla JS.
In short, signals are an efficient and targeted way to respond to changes without having to do state comparison and DOM-diffing. The effect(fn) method will call the specified function, and also subscribe it to changes in the signal's value. The full poor man's signals code in all its 36 line glory can be found in the tiny-signals repo on Github.
Or read this on Hacker News