• This hook is used to set up a single document as the base of an app session. This is a common pattern for simple multiplayer apps with shareable URLs.

    It will first check for the automergeUrl in the URL hash: //myapp/#automergeUrl=[document URL] Failing that, it will check for a automergeUrl key in localStorage. Failing that, it will call onNoDocument, expecting a handle to be returned.

    The URL and localStorage will then be updated. Finally, it will return the Automerge document's URL.

    Type Parameters

    • T

    Parameters

    Returns DocHandle<T>

    The document handle

Generated using TypeDoc