diff --git a/README.md b/README.md index 08b331fc..8e5fff2b 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,9 @@ PORT=1234 node ./node_modules/y-websocket/bin/server.js ### Example: Observe types ```js +import * as Y from 'yjs'; + +const doc = new Y.Doc(); const yarray = doc.getArray('my-array') yarray.observe(event => { console.log('yarray was modified')