Skip to content

Commit 788b3ad

Browse files
fix custom component
1 parent b5a7c9a commit 788b3ad

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

client/packages/lowcoder/src/comps/comps/customComp/customComp.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { EventData, EventTypeEnum } from "./types";
1212
import { hiddenPropertyView } from "comps/utils/propertyUtils";
1313
import { trans } from "i18n";
1414
import { EditorContext } from "comps/editorState";
15-
import * as ReactDOMClient from 'react-dom/client';
1615

1716
// TODO: eventually to embedd in container so we have styling?
1817
// TODO: support different starter templates for different frameworks (react, ANT, Flutter, Angular, etc)
@@ -60,8 +59,7 @@ const defaultCode = `
6059
);
6160
6261
const ConnectedComponent = ${trans("customComp.sdkGlobalVarName")}.connect(MyCustomComponent);
63-
const container = document.getElementById('root');
64-
const root = ReactDOMClient.createRoot(container);
62+
const root = ReactDOM.createRoot(document.getElementById("root"));
6563
root.render(<ConnectedComponent />);
6664
6765
</script>

0 commit comments

Comments
 (0)