79569053

Date: 2025-04-11 14:22:02
Score: 0.5
Natty:
Report link
mySignal = signal(0);

this.mySignal.update(val => val + 1);

effect(() => {
    this.mySignal();
    console.log('has been triggered');
});

this is the easiest way could figure out when dealing with a similar issue. In my case i only needed a trigger for an effect without needing the value.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Jonathan Pauw