1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/** @jsxImportSource https://esm.sh/react */
import { React, render } from "https://esm.town/v/jxnblk/ReactStream";
function App() {
const [count, setCount] = React.useState<number>(0);
return (
<html>
<head />
<body>
<h1>Hello</h1>
<pre>{count}</pre>
<button onClick={() => setCount(count - 1)}>- Dec</button>
<button onClick={() => setCount(count + 1)}>+ Inc</button>
</body>
</html>
);
}
export default render(App, import.meta.url);