Skip to content

Commit ea2297e

Browse files
committed
add mountLayout util func
1 parent f11fda9 commit ea2297e

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

idom/client/app/core_modules/layout.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,21 @@ export function mountLayoutWithWebSocket(mountElement, endpoint) {
4242
);
4343
}
4444

45-
const cmpt = html`<${Layout}
46-
registerUpdateCallback=${registerUpdateCallback}
47-
sendCallback=${sendCallback}
48-
/>`;
45+
return mountLayout(mountElement, registerUpdateCallback, sendCallback);
46+
}
4947

50-
return reactDOM.render(cmpt, mountElement);
48+
export function mountLayout(
49+
mountElement,
50+
registerUpdateCallback,
51+
sendCallback
52+
) {
53+
return reactDOM.render(
54+
html`<${Layout}
55+
registerUpdateCallback=${registerUpdateCallback}
56+
sendCallback=${sendCallback}
57+
/>`,
58+
mountElement
59+
);
5160
}
5261

5362
export default function Layout({ registerUpdateCallback, sendCallback }) {

idom/client/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "idom-client-react",
33
"description": "A client for IDOM implemented in React",
4-
"version": "0.3.0",
4+
"version": "0.4.0",
55
"author": "Ryan Morshead",
66
"license": "MIT",
77
"repository": {

0 commit comments

Comments
 (0)