granularly derived store

My use-case: I have an array of coordinates as input. For each coordinate I want to keep a set of offsets. The input can change, coordinates can get removed or added to the array. I contorted something together with mapArray https://playground.solidjs.com/anonymous/981e35fd-a794-479e-a8dd-777306b24a87 but I wonder if there isn't something a bit more elegant/primitive-y to do the same.
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
2 Replies
thetarnav
thetarnav2y ago
so the actual values of coordinates and offsets are totally independent, the index/order is the only synchronised? seems like this does the job: https://playground.solidjs.com/anonymous/0d62f7fb-5b80-4fad-a474-49e6bf232aad
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
bigmistqke
bigmistqkeOP2y ago
oo so that's how ur supposed to use mapArray yes this simplifies things a lot, thank u so much!
Want results from more Discord servers?
Add your server