createResource with a nested source signal doesn't retrigger
My source signal is an arrow function which returns an object that calls a signal for a value. When I
setStartTime
the epg.getEvents
function is not called. Why is my startTime not being tracked properly?5 Replies
PS - there is nothing async happening - I checked and getOwner does have a value... Even tried using
on
rather than arrow functionI dont see any issue with your code. Can you create a small repro on playground?
Maybe you setStartTime to the same value so it doesn't trigger due to equal check?
Definitely a new value - I'll keep digging and see if I can setup a playground
You might want to try adding some logging, a few log statements for the resource source array accessor, the fetcher, and an effect on the startTime signal might make it clearer what is updating when. Apologies if you've already tried that, I just had a similar error and that helped me solve my own silly mistake 😃
Yea I've got a bunch of logging. I see there are 60 observers (which seems right) - And I see the setStartTime triggering with different values - and I have a console.log inside the source for createResource and that is never called again (after the first time)