Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#650·sharedb

how to reload/refresh ShareDB document?

Author: icocoCreated May 8, 2024Updated Jan 21, 2025

as topic, a document was created as follow code :

const shareDBDoc = this.shareDBConnection.get('documents', key ); 
...
shareDBDoc.create(initialDocument, json1Presence.type.uri);

since the document does not reload file from disk realtime, have to reload/refresh document manually,

I use ' shareDBDoc.destory() ', it does not work, report error bellow:

ShareDBError: Document already exists

my questions, how to reload or refresh the shareDBDoc ? can not find relative guide from the online document yet..

thank for help in advance

Source: share/sharedb

View original on GitHubView discussion on GitHub