Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

docs(y-indexeddb): add README.md (#1886)

Himself655535440c5507
diff --git a/packages/y-indexeddb/README.md b/packages/y-indexeddb/README.md
new file mode 100644
index 0000000000..f8350381cb
--- /dev/null
+++ b/packages/y-indexeddb/README.md
@@ -0,0 +1,18 @@
+# @toeverything/y-indexeddb
+
+> This package haven't been published yet.
+
+## Usage
+
+```ts
+import { createIndexedDBProvider } from '@toeverything/y-indexeddb';
+import * as Y from 'yjs';
+const yDoc = new Y.Doc();
+
+const provider = createIndexedDBProvider('docName', yDoc);
+provider.connect();
+await provider.whenSynced.then(() => {
+ console.log('synced');
+ provider.disconnect();
+});
+```