Hello, i am currently struggling with Signals. Here is my simple scenario:
I have a Canvas i want to hide onTap.
// first approach
let touched = R.val(false);
canvas.hidden = touched;
TG.onTap().subscribe(() => touched = R.val(true));
// second approach
const touched = R.boolSignalSource("id-touched");
touched.set(false);
canvas.hidden = touched.signal;
TG.onTap().subscribe(() => touched.set(true));
I bind the Canvas’ hidden field to my touched Signal.
Next i want to propagate a change to the touched Signal onTap.
The first approach doesn’t work. Does it destroy the binding to the original touched Signal onTap?
The second approach works, but it feels wrong to use. Also there are only 3 SignalSource types (bool, scalar, string)
I guess the core question is: how do i propagate change in my own Signals?