Skip to content

Commit d9128ff

Browse files
committed
switch to es6 compat react from pika
we need to do this because preact has issues with <Suspense/> and lazy() which means we cannot load packages dynamically
1 parent ad3e551 commit d9128ff

File tree

7 files changed

+3976
-33
lines changed

7 files changed

+3976
-33
lines changed

src/idom/client/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# IDOM Client
2+
3+
An ES6 Javascript client for IDOM

src/idom/client/html/simple-view.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
<body>
88
<div id="app"></div>
99
<script type="module">
10-
import { h, render } from "../web_modules/preact.js";
11-
import Layout from "../js/index.js";
10+
import { renderLayout } from "../src/index.js";
1211

1312
const uri = document.location.hostname + ":" + document.location.port;
1413
const url = (uri + document.location.pathname).split("/").slice(0, -2);
@@ -23,8 +22,7 @@
2322
}
2423
let endpoint = protocol + "//" + url.join("/");
2524

26-
const mount = document.getElementById("app");
27-
render(h(Layout, { endpoint: endpoint }), mount);
25+
renderLayout(document.getElementById("app"), endpoint);
2826
</script>
2927
</body>
3028
</html>

0 commit comments

Comments
 (0)