Solid · Partial values
Structural sharing
Every change produces a new value that reuses the objects of its unchanged parts instead of copying them. Reference equality (===) therefore shows whether a part changed, at the same cost for a reply of any size, and a renderer can skip what it has already rendered.
z.object({
member: z.object({ name: z.string(), pass: z.string() }),
seats: z.array(z.string()),
why: z.string(),
})[
'{"member":{"name":"Grace","pass":"season"},"seats":["C4","C5"],"why":"Near',
' the aisle."}',
]first === second first.member === second.member first.seats === second.seats first.why === second.why
[false, true, true, false]
Runs in this page on the installed package. The input and the expected output are defined by the example.