Mutate a Resource after fetch efficiently when using <For>
Here's some "pseudo"code:
Now this works, however, anytime a file is created and
I have messed around with using this setup based off this Reddit thread from 2 years:
but to no avail. Whenever I call
TLDR: I need a reactive resource that I can update with
Also on a side note, can I pass multiple signals as a source to
Now this works, however, anytime a file is created and
mutate is called, For does not do any diffing and just goes through the arduous process of re-initializing every single DOM element it had already rendered.I have messed around with using this setup based off this Reddit thread from 2 years:
but to no avail. Whenever I call
mutate my entire list which was rendered by <For> simply disappears. I honestly do not really understand what in the world createDeepSignal is supposed to do. The API seems extremely archaic.TLDR: I need a reactive resource that I can update with
mutate, but that still has SolidJS's <For> diffing so the entire list isn't re-rendered when just one new item is added to the array.Also on a side note, can I pass multiple signals as a source to
createResource? Based off the typedef () it would seem not, but that seems like a major oversight to me, is there seriously no way to pass an array of Accessors or something like that??