• Returns a Y.Array<T> object from the Y.Doc in the current context.

    The string name is the name of the top-level Yjs object to return. Two clients that call useArray(...) with the same name will get the same object.

    By default, this will subscribe the calling component to updates on the object and its children. See ObjectOptions and ObserverKind for finer control of observer behavior.

    Type Parameters

    • T

      The type of the values in the array.

    Parameters

    • Optional name: string

      The name of the top-level Yjs object to return. Defaults to empty string.

    • Optional objectOptions: ObjectOptions

    Returns Y.Array<T>