Skip to content

Commit

Permalink
feat(04-zkapp-ui-with-react.mdx): expose api to main thread with coml…
Browse files Browse the repository at this point in the history
…ink example
  • Loading branch information
ymekuria committed Sep 27, 2024
1 parent 1bb9fc4 commit d1cf8e2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/zkapps/tutorials/04-zkapp-ui-with-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ export const api = {
},
};
```
#### Expose functions to the main thread with `comlink`

```ts ignore
// Expose the API to be used by the main thread
Comlink.expose(api);
```

### Environment configuration

Expand Down

0 comments on commit d1cf8e2

Please sign in to comment.