Automerge Repo - v2.3.0-alpha.0
    Preparing search index...
    • Update a document and our sync state on receiving a sync message

      Type Parameters

      • T

      Parameters

      Returns [Automerge.Doc<T>, Automerge.SyncState, null]

      An array of [newDoc, newSyncState, null] where newDoc is the updated state of doc, newSyncState should replace inState.

      Note that this function has three return values for legacy reasons. The third value used to be a sync message to send back but this is now always null and you should instead call generateSyncMessage after calling receiveSyncMessage to see if there are new messages to send.