Reactivity does not flow through nested structure and <For />

Hey peeps, I am building a nested structure and it is probably easier to look at the example here https://playground.solidjs.com/anonymous/6b5977b6-6709-413a-93b6-d9cae938b4e7 I expects the result to be 015 but get 012 instead Not sure if anyone might know why updated order doesn't not reflect correctly inside <For /> Thanks,
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
3 Replies
phungleson
phungleson16mo ago
Possibly due to I am using produce and objects are keep the same? It seems to be the purpose of produce though
thetarnav
thetarnav16mo ago
{(item) => item.order} is not inside a computation, so reading .order property does not subscribe to it This fixes it: {(item) => <>{item.order}</>} https://playground.solidjs.com/anonymous/fab6550b-9578-42b2-ae14-8373284cf5a6
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
phungleson
phungleson16mo ago
Oh thanks! Hmm now I have to look at my code and see what the issue is since I definitely have computation
Want results from more Discord servers?
Add your server