From 68b44189563e9694a0991ba6b40cd0a8dbf1da59 Mon Sep 17 00:00:00 2001 From: Moritz Hedtke <13287984+mohe2015@users.noreply.github.com> Date: Mon, 27 Apr 2020 22:35:37 +0200 Subject: [PATCH] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3d6b8cfe..3638ca49 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,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: -```typescript + +```js import * as Y from 'yjs' import { WebrtcProvider } from 'y-webrtc' import { IndexeddbPersistence } from 'y-indexeddb' @@ -173,9 +174,10 @@ async function main() { console.log(sum) } main() - ``` + Example output: + ```bash 32 # stored sum from indexeddb (with 1 already added to it) new sum: 38 # delayed new sum fetched from network