diff --git a/packages/react/src/containers/Designer.tsx b/packages/react/src/containers/Designer.tsx index 153534174..dec30daef 100644 --- a/packages/react/src/containers/Designer.tsx +++ b/packages/react/src/containers/Designer.tsx @@ -24,7 +24,7 @@ export const Designer: React.FC<IDesignerProps> = (props) => { props.engine.unmount() } } - }, []) + }, [props.engine]) if (engine) throw new Error( diff --git a/packages/react/src/containers/Viewport.tsx b/packages/react/src/containers/Viewport.tsx index 139d4eac2..194121824 100644 --- a/packages/react/src/containers/Viewport.tsx +++ b/packages/react/src/containers/Viewport.tsx @@ -38,7 +38,7 @@ export const Viewport: React.FC<IViewportProps> = ({ return () => { viewport.onUnmount() } - }, []) + }, [viewport]) return ( <div {...props} diff --git a/packages/react/src/containers/Workspace.tsx b/packages/react/src/containers/Workspace.tsx index fd787ecba..c44b01527 100644 --- a/packages/react/src/containers/Workspace.tsx +++ b/packages/react/src/containers/Workspace.tsx @@ -29,7 +29,7 @@ export const Workspace: React.FC<IWorkspaceProps> = ({ designer.workbench.ensureWorkspace(workspace) oldId.current = workspace.id return workspace - }, [id]) + }, [id, designer]) return ( <Fragment> <WorkspaceContext.Provider value={workspace}>