3 ms·
I have a complicated spaghetti object that I need to render. Given: let spaghetti = $state(uglyMess) Does `uglyMess.thingOne[1].anotherThing = { moreMess
by jcuenod 3y ago
I have a complicated spaghetti object that I need to render. Given:
let spaghetti = $state(uglyMess)
Does `uglyMess.thingOne[1].anotherThing = { moreMess }` re-render the whole tree or just the children of `uglyMess.thingOne[1].anotherThing`?
- onsclom 3y agoIf you created `anotherThing` as nested state, then just the children! See this for a real example: https://svelte-5-preview.vercel.app/docs/fine-grained-reactivity https://svelte-5-preview.vercel.app/docs/fine-grained-reacti... Here is the same thing in SolidJS with more explanation: https://www.solidjs.com/tutorial/stores_nested_reactivity https://www.solidjs.com/tutorial/stores_nested_reactivity