Skip to content

Commit

Permalink
feat(04-zkapp-ui-with-react.mdx): update load web worker step
Browse files Browse the repository at this point in the history
  • Loading branch information
ymekuria committed Sep 26, 2024
1 parent a0f5c0c commit a64a235
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions docs/zkapps/tutorials/04-zkapp-ui-with-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,11 @@ To learn more about `useEffect` hooks, see [useEffect](https://react.dev/referen
#### Load web worker and setup Mina active instance
```ts ignore
...
setDisplayText('Loading web worker...');
console.log('Loading web worker...');
displayStep('Loading web worker...')
const zkappWorkerClient = new ZkappWorkerClient();
await timeout(5);

setDisplayText('Done loading web worker');
console.log('Done loading web worker');
setZkappWorkerClient(zkappWorkerClient);
await new Promise((resolve) => setTimeout(resolve, 5000));
displayStep('Done loading web worker')

await zkappWorkerClient.setActiveInstanceToDevnet();
...
Expand Down

0 comments on commit a64a235

Please sign in to comment.