If dealing with a store shaped like this:
{
"count": 0,
"items": []
}
And having two derived stores ($countStore and $itemsStore) that return the respective fields, updating items on the main store does not cause a re-render on components that depend on just countStore, but updating count does cause a render on components that depend on just itemsStore, why exactly is that?
Here's a REPL showing this behavior.
I would assume this happens for all non-primitive fields, but selectors in Redux for example don't have this behavior, so how does Svelte diff derived stores? Does it simply ignore non-primitive fields causing renders for every update? If so, is there a way to save on renders when dealing with objects?