diff --git a/demo/browser/src/App.tsx b/demo/browser/src/App.tsx index d54dc00..f3e2360 100644 --- a/demo/browser/src/App.tsx +++ b/demo/browser/src/App.tsx @@ -15,8 +15,8 @@ const stopEvent = workflowEvent(); const workflow = createWorkflow(); workflow.handle([startEvent], () => { - const context = getContext(); setTimeout(() => { + const context = getContext(); context.sendEvent(stopEvent.with("Hello, World!")); }, 1000); });