@webreflection/alien-signals
alien-signals with a Preact signals like API and a class based approach for easy brand check.
import {
Signal,
signal, computed,
effect, untracked,
} from '@webreflection/alien-signals';
const count = signal(0);
const double = computed(() => count * 2);
console.assert(count instanceof Signal);
console.assert(double instanceof Signal);
effect(() => {
console.log('count', count.peek());
console.log('double', double.value);
});
count.value++;
A signal created via signal(value, { greedy: true }) will effect any time the same value is set again, as opposite of ignoring the explicit set operation.
Follow this discussion if interest in upstream feedbacks: https://github.com/stackblitz/alien-signals/issues/83