AFFiNE/packages/y-provider
2023-07-22 13:10:20 +00:00
..
src perf: lazy doc provider factory (#3330) 2023-07-21 05:23:18 +00:00
package.json chore: bump version (#3346) 2023-07-22 13:10:20 +00:00
README.md perf: lazy doc provider factory (#3330) 2023-07-21 05:23:18 +00:00
tsconfig.json perf: lazy doc provider factory (#3330) 2023-07-21 05:23:18 +00:00

A set of provider utilities for Yjs

createLazyProvider

A factory function to create a lazy provider. It will not download the document from the provider until the first time a document is loaded at the parent doc.

To use it, first define a DatasourceDocAdapter. Then, create a LazyProvider with createLazyProvider(rootDoc, datasource).