1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/** @jsxImportSource https://esm.sh/react@18.2.0 **/
// Make sure to only import from esm.sh (npm: specifier are not supported in the browser)
import ReactDOM from "https://esm.sh/react-dom@18.2.0";
import React from "https://esm.sh/react@18.0.0";
import { useState } from "https://esm.sh/react@18.0.0";
import { Tldraw } from "https://esm.sh/tldraw@2.1.0";
// import "https://esm.sh/tldraw/tldraw.css";
export function App() {
return (
<>
<div style={{ position: "fixed", inset: 0 }}>
<Tldraw />
</div>
</>
);
}
// The app will be rendered inside the root div
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(<App />);
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
June 6, 2024