Resource from async generator?
Hey everyone, brand new to SolidJS.
I'm working with a library that uses an async generator to return the current state, and then await for any updates (or errors). This is close enough to a resource that I figured it would make sense to wrap the generator.
The problem is that the value doesn't seem to be reactive after a refetch. I can log that the value being returned on the refetch (
next.value
) is correct, but it doesn't trigger rendering or the effect to fire again.1 Reply
I think the misunderstanding is somewhere else, because even a simple Signal is not reactive:
okay, I figured it out
so the problem was that new broadcasts were being pushed to the array and returned as part of the generator
so the array returned by the generator was not actually returning new values, but rather the same value at a new point in time
so solid uses === and decides nothing has changed, so no need to render