reading from it is reading from the projection: fine-grained and live.
writing to it makes an automerge change on the handle, which comes back to
the projection as patches. every assignment, delete, push, splice
etc is its own change; for several edits in one change, use
handle.change.
nested objects are views of whatever is at their path in the document right
now, so todo.tags always means the current tags. writes under a key with
a document mounted on it go to the mounted document.
sort, reverse and copyWithin throw. automerge has no way to move an
item in a list, so they would have to delete every item and insert it again,
which turns nested objects into copies and merges badly with anyone else
editing the list. splice it into its new order yourself if you mean it.
get a mutable version of a document projection (from useDocument, createDocumentProjection or makeDocumentProjection).
reading from it is reading from the projection: fine-grained and live. writing to it makes an automerge change on the handle, which comes back to the projection as patches. every assignment,
delete,push,spliceetc is its own change; for several edits in one change, usehandle.change.nested objects are views of whatever is at their path in the document right now, so
todo.tagsalways means the currenttags. writes under a key with a document mounted on it go to the mounted document.sort,reverseandcopyWithinthrow. automerge has no way to move an item in a list, so they would have to delete every item and insert it again, which turns nested objects into copies and merges badly with anyone else editing the list.spliceit into its new order yourself if you mean it.