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(); ...