onPatches offPatches
Documents the onPatches and offPatches symbols and what patch objects look like:
add
patches signal that a key was added to an object.
{type: "add", key: "b", value: 1}
delete
patches signal that a key was deleted from an object.
{type: "delete", key: "a"}
set
patches signal that an existing key's value was set to another value.
{type: "set", key: "c", value: 2}
splice
patches signal a list-like object had enumerable values added, removed
or both at a specific index.
{type: "splice", index: 0, deleteCount: 10, insert: [item1, item2]}
move
patches signal a list-like object had an enumerable value move from one
position to another.
{type: "move", fromIndex: 1, toIndex: 2}
values
patches signal a container-like object (like Set
) has
had items added or removed.
{type: "values", delete: [item0], insert: [item1, item2]}