Index block does not notice change in a store

for some reason, the loop does not notice the change in the store. i've tried with signal and got the same result. sc: https://pastebin.com/WANfg1Mp
8 Replies
bokuno_disk_cord
produce works. hm....
mdynnl
mdynnl2y ago
in case it wasn't obvious, with produce, it'd be just prev.items[idx].count++ set("items", idx, "count", v => v + 1) with path, and produce can be used anywhere nested e.g anywhere except the leaf setter v => v + 1 in above
bokuno_disk_cord
tobe clear, with my original code, Index does notice on item removed and added to the list. but not an individual item. produce does exactly what i need. but IDK why it's necessary. there is also createMutable and modifyMutable which remove the need for produce. i guess, i'll use them instead.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
mdynnl
mdynnl2y ago
you might wanna dig up opinions on createMutable in this discord, IIRC it's planned to be moved outisde core for reasons
bokuno_disk_cord
i thought, it already is. its in the tutorial afterall. https://www.solidjs.com/docs/latest/api#createmutable
mdynnl
mdynnl2y ago
like search createMutable in this server
Want results from more Discord servers?
Add your server