Skip to content

Commit

Permalink
fix(react): fix ui can not refresh with top rerender
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Sep 22, 2021
1 parent cdf10ff commit cf63e82
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/react/src/containers/Designer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const Designer: React.FC<IDesignerProps> = (props) => {
props.engine.unmount()
}
}
}, [])
}, [props.engine])

if (engine)
throw new Error(
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/containers/Viewport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const Viewport: React.FC<IViewportProps> = ({
return () => {
viewport.onUnmount()
}
}, [])
}, [viewport])
return (
<div
{...props}
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/containers/Workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}>
Expand Down

0 comments on commit cf63e82

Please sign in to comment.