diff --git a/packages/backend/src/Connection.ts b/packages/backend/src/Connection.ts index 0940434..241e85f 100644 --- a/packages/backend/src/Connection.ts +++ b/packages/backend/src/Connection.ts @@ -22,6 +22,8 @@ class Connection { this.options = merge(defaultOptions, options) this.configure() + + return this } private configure = () => diff --git a/packages/client/src/Connection.ts b/packages/client/src/Connection.ts index 503240a..708d5ab 100644 --- a/packages/client/src/Connection.ts +++ b/packages/client/src/Connection.ts @@ -50,6 +50,8 @@ class Connection { this.docSet = new Automerge.DocSet() this.connect() + + return this } sendData = (data: any) => { diff --git a/packages/example/src/Room.tsx b/packages/example/src/Room.tsx index a4c6623..1f1350e 100644 --- a/packages/example/src/Room.tsx +++ b/packages/example/src/Room.tsx @@ -31,6 +31,7 @@ class Room extends Component { componentDidMount() { this.addUser() + setTimeout(this.addUser, 10) } render() {