-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.tsx
42 lines (30 loc) · 835 Bytes
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { render, DOMVContext, createTimeline, Timeline } from '@virtualstate/dom';
import { SiteBody } from './site';
import { h } from "./h";
async function run() {
const root = document.getElementById("root");
if (!root) {
throw new Error("Expected root");
}
const context = new DOMVContext({
root
});
// const timelinePromise = createTimeline(
// context,
// reportTimeline
// );
await render(
<SiteBody />,
context
);
console.log("Completed rendering");
await context.close();
// await reportTimeline(await timelinePromise);
}
async function reportTimeline(timeline: Timeline) {
// console.log(timeline[timeline.length - 1]);
}
window.proposalSiteRender = run();
window.proposalSiteRender.catch(error => {
throw error;
});