Open thomasballinger opened 5 months ago
I looked into this a little, something like https://github.com/benjamine/jsondiffpatch could be used. This could look like
We could use _id as the identity heuristic in arrays.
List views are the number one use case here, a first pass could operate only on query results that are arrays at the top level.
TanStack query calls this "structural sharing," so it's sort of a normal thing to provide. Curious how svelte-query implements it.
The React client doesn't do this either yet, but it would nice to provide fine-grained reactivity by diffing query results to produce a series of modifications on a deeply reactive Svelte object.