Skip to content

Commit

Permalink
clarify that all client function calls return a promise
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscalo committed Jul 1, 2021
1 parent b5cd97f commit 654206b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ const service = createService(callHandler);
service.foo.bar.baz; //=> path = ["foo", "bar", "baz"]

// (3) Whenever we invoke a function call, the `callHandler` provided to
// `createService()` is called with the provided arguments.
// `createService()` is called with the provided arguments. Note that because
// this is remote communication, all function calls return a promise that must
// be `await`-ed or `then()`-ed.
const response = await service.foo.bar.baz({ name: "World" }, "!");

// (4) Finally, the provided `callHandler()` is invoked with:
Expand Down

0 comments on commit 654206b

Please sign in to comment.