webstrand
<Show> not tracking signals
For some reason when I use another signal inside of Show's callback, it does not track that signal. When I don't use Show's callback, everything works fine.
https://playground.solidjs.com/anonymous/9581e103-9f05-4744-ba92-f285dc89d19f
28 replies
Resource state never updates when consumed by <Show>
https://playground.solidjs.com/anonymous/d47ac50e-b5d4-4b1c-8cff-d2c8ed7e1199
Refetch the resource until it fails to make a joke, observe that the
joke.state
never updates afterward.
Is this a bug?36 replies
Adapting a list of objects to signals
I've got an API that returns a list of objects like
I fetch this data using
useResource
and I render it out with a tree of components like
The problem comes when I invalidate the resource and re-fetch it, all of the Result
components get re-rendered from scratch, because the objects are different. And even if the objects were the "same" then they wouldn't update properly because props.result.value
isn't a signal.
Does solid provide any tools for mapping data like this into signals so that my components can be reactive to it?8 replies