Update README.md

This commit is contained in:
Moritz Hedtke
2020-04-27 22:39:09 +02:00
committed by GitHub
parent 68b4418956
commit 8221db795a

View File

@@ -139,7 +139,8 @@ the API docs.
### Example: Using and combining providers
The most common way to combine providers is probably to combine some network provider with the local indexeddb provider:
The most common way to combine providers is probably
to combine some network provider with the local indexeddb provider:
```js
import * as Y from 'yjs'
@@ -153,7 +154,8 @@ async function main() {
let idbP = new IndexeddbPersistence('count-demo', ydoc)
await idbP.whenSynced
// this will sync between clients in the background, may be replaced by any network provider
// this will sync between clients in the background,
// may be replaced by any network provider
let webP = new WebrtcProvider('count-demo', ydoc)
webP.connect()