update JSON.stringify when child object updates
Hello, i'm using solidjs in few projects, and I managed to find something I don't really understand how to solve 🙂
https://playground.solidjs.com/anonymous/d153ac69-05b0-4d11-b42c-f0e252b7db5b
After one second x.z in appstore is updated ... I would like JSON.stringify to also be updated, how can I achieve this?
In my project I have one large API response that I am displaying with json stringify, I am using reconcile, but as in example above, it does not update.
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
2 Replies
JSON.stringify will automatically track all the properties of a store, but since you’re unwrapping the stores they stop being reactive, so the memo doesn’t rerun. Remove the unwraps and it’ll work as expected
the best! I did not think unwrap works like this, thank you so much!