You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Y.Doc has a field isSynced which corresponds to YSweetProvider's synced property (equivalent to status === STATUS_CONNECTED).
The field is not mentioned in the Yjs docs, but it's probably worth implementing anyway for compatibility. The yjs source says:
This is set to true when the connection provider has successfully synced with a backend.
Note that when using peer-to-peer providers this event may not provide very useful.
Also note that not all providers implement this feature. Provider authors are encouraged to fire
the sync event when the doc has been synced (with true as a parameter) or if connection is
lost (with false as a parameter).
In the meantime, developers can access .synced on the YSweetProvider instance instead of the Y.Doc, which is equivalent. They can also use .hasLocalChanges, which reflects whether changes after the initial connection handshake are synced, not just that the initial handshake is complete as .isSynced implies.
The text was updated successfully, but these errors were encountered:
Y.Doc has a field
isSynced
which corresponds toYSweetProvider
'ssynced
property (equivalent tostatus === STATUS_CONNECTED
).The field is not mentioned in the Yjs docs, but it's probably worth implementing anyway for compatibility. The yjs source says:
In the meantime, developers can access
.synced
on theYSweetProvider
instance instead of theY.Doc
, which is equivalent. They can also use.hasLocalChanges
, which reflects whether changes after the initial connection handshake are synced, not just that the initial handshake is complete as.isSynced
implies.The text was updated successfully, but these errors were encountered: