Skip to content

Commit

Permalink
feat(04-zkapp-ui-with-react.mdx): section about Comlink.wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
ymekuria committed Sep 30, 2024
1 parent 9fc4fb7 commit 78fdd33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/zkapps/tutorials/04-zkapp-ui-with-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ The web worker client code resides in the `04-zkapp-browser-ui/ui/app/zkappWorke
// Initialize the worker from the zkappWorker module
const worker = new Worker(new URL('./zkappWorker.ts', import.meta.url), { type: 'module' });
```
- Create a proxy object `remoteApi` that provides typesafe access to the worker's API methods.
- With `Comlink.wrap`, create a proxy object `remoteApi` that provides typesafe access the worker's API methods.
```ts
// Wrap the worker with Comlink to enable direct method invocation
Expand Down

0 comments on commit 78fdd33

Please sign in to comment.