Dusty
Suspending or creating a resource from a Signal
As far as I can see, it's not possible to tell if Dexie's liveQuery is returning undefined because it doesn't know yet vs because there is no response.
I assume that the first undefined response is because it doesn't know yet and subsequent ones are ecause it's actually undefined.
I tried to hook something up that tracks whether the subscriber has been hit before, but now I've lost reactivity: https://playground.solidjs.com/anonymous/a350db31-2daf-4717-90d6-29a4eed2d8e6
32 replies
Suspending or creating a resource from a Signal
Yeah, here's a demo with it working with a form:
https://playground.solidjs.com/anonymous/6ef86395-7a53-4473-a038-98ad1df25255
32 replies
Suspending or creating a resource from a Signal
Hah, I just seconds ago got that working, though it.... lacks elegance: https://gist.github.com/dusty-phillips/dde181bbbe887598e576abd32a429c62
32 replies
Suspending or creating a resource from a Signal
One thing I thought might work was using my signal to trigger the resource by passing it as
source
to createResource
, but the resource then returns undefined until the signal initially fiers, which brings me right back to needing <Show> all over.32 replies