Returns a Y.Map<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 useMap(...) 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 map. Keys are always strings.
Parameters
Optionalname: string
The name of the top-level Yjs object to return. Defaults to empty string.
Returns a
Y.Map<T>
object from theY.Doc
in the current context.The string
name
is the name of the top-level Yjs object to return. Two clients that calluseMap(...)
with the samename
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.