-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
29 lines (26 loc) · 852 Bytes
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<title>My React App</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
<script type="module">
import { main } from "./build/dev/javascript/gild/gild.mjs";
import * as gleam from "./build/dev/javascript/gild/gleam.mjs";
// converting array of arrays to object
// gleam will automatically add some helper functions to the array
// but i havn't found a more simple way to convert it to the object
// that react expects
function toObject(arrayOfArrays) {
return arrayOfArrays.reduce((acc, [key, value]) => {
acc[key] = value;
return acc;
}, {});
}
let ele = main()
console.log(gleam.List)
</script>
<div id="app"></div>
</body>
</html>