1
2
3
4
5
6
7
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import { jsx as _jsx } from "https://esm.sh/react/jsx-runtime";
import { TodoApp } from "https://esm.town/v/stevekrouse/TodoApp";
const root = createRoot(document.getElementById("app"));
let initialTodos = await fetch("https://stevekrouse-todo_list.web.val.run/todos").then(r => r.json());
root.render(_jsx(TodoApp, { initialTodos: initialTodos }));
👆 This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.