This library is a simple but robust implementation reactive signals and effects. Signals and effect have become popular in web application frameworks because they allow a change in a value (signal) in one part of the application to implicitly trigger updates (effects) in dependent parts of the application. Most beneficially, signals do not need to understand the effects that depend upon them.
const length = signal(5.0);
const height = signal(2.5);
effect(() => {
console.log(`area = ${length.value * height.value}`);
});
npm i @in-code/signal-effects
MIT © kevin-in-code