How to make Signal/Resource do incremental update

Hey peeps, My app is a bit evolving and it ended up something like this: https://playground.solidjs.com/anonymous/149dc5aa-a5f4-482e-85ad-727f9f0c2086 I would like to press button and both resource and message updated. I used to use store instead of resource and it works fine. But I would like to move to resources to make use of its functionalities. With current resource code, the whole resource get replaced and message is gone. I wonder whether there is a way to make this work? Cheers,
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
3 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Alex Lohr
Alex Lohr2y ago
There is a createFetch package in solid-primitives that has an aggregate modifier which allows you to aggregate your responses.
phungleson
phungleson2y ago
Thanks peeps, Hmm that's quite tricky. I probably cannot use non-key version, as I would like to use defined object (resource) => instead of passing signal around. There are too many of components and signal concept looks a bit strange outside of solid. I probably cannot use keyed boolean version either, due to the same reason.