-
Notifications
You must be signed in to change notification settings - Fork 146
Description
Hi there! I'm just trying something simple in NextJS. I'm importing the component like this:
const WorkflowBuilder = dynamic(
() => import('../../../../components/WorkflowBuilder'),
{
loading: () => ,
ssr: false,
},
);
The WorkflowBuilder component is also running on the client (use cient).
const controller = useSequentialWorkflowDesignerController();
useEffect(() => {
if (controller?.isReady()) {
alert('Controller is ready');
} else {
alert('Controller is not ready');
}
}, [controller]);
For some reason, it never hits the Controller is ready conditions. It's constantly false. Is there anything I'm missing here?
The reason I'm trying to do this is because I'm trying to update the workflow definition but I think I'm hitting a race condition because I'm constantly getting the error message stating that the designer is not ready. So I'm just trying to do a basic check and set some state when the designer is ready.
Bram