From a64a235f29240d18caa98655bc9efd2947716e5a Mon Sep 17 00:00:00 2001 From: ymekuria Date: Thu, 26 Sep 2024 11:04:25 -0700 Subject: [PATCH] feat(04-zkapp-ui-with-react.mdx): update load web worker step --- docs/zkapps/tutorials/04-zkapp-ui-with-react.mdx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/zkapps/tutorials/04-zkapp-ui-with-react.mdx b/docs/zkapps/tutorials/04-zkapp-ui-with-react.mdx index 1071176dd..34133de33 100644 --- a/docs/zkapps/tutorials/04-zkapp-ui-with-react.mdx +++ b/docs/zkapps/tutorials/04-zkapp-ui-with-react.mdx @@ -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(); ...