1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3import { BranchControl } from "./BranchControl.tsx";
4
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useEffect, useState } from "https://esm.sh/react@18.2.0?dev";
3import { CreateBranch } from "./CreateBranch.tsx";
4
84
85 // Handle branch selection change
86 const handleBranchChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
87 const newBranchId = e.target.value;
88 setBranchId(newBranchId);
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useLocalStorage } from "https://esm.sh/react-use?dev&deps=react@18.2.0&react-dom@18.2.0";
3import React, { useState } from "https://esm.sh/react@18.2.0?dev";
4import { Chat } from "./Chat.tsx";
5import { Login } from "./Login.tsx";
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3
4interface ApiKeyWarningProps {
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { Player } from "/shared/types.ts";
3import React, { useState } from "https://esm.sh/react@18.2.0?dev";
4
5interface PlayerListProps {
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useCallback, useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
4
5function ShaderRenderer({ vertexShader, fragmentShader, animated = false, width = "100%", height = "200px" }) {
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { App } from "/frontend/components/App.tsx";
3import { ErrorBoundary } from "/frontend/components/ErrorBoundary.tsx";
4import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?dev";
5import React from "https://esm.sh/react@18.2.0?dev";
6
7// Log that we're using the development build
8console.log(
9 "%c🛠️ React Development Build Enabled",
10 "background: #61dafb; color: #282c34; font-weight: bold; padding: 4px 8px; border-radius: 4px;",
11);
15const root = createRoot(document.getElementById("root")!);
16root.render(
17 <React.StrictMode>
18 <ErrorBoundary>
19 <App />
20 </ErrorBoundary>
21 </React.StrictMode>,
22);
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useState } from "https://esm.sh/react@18.2.0?dev";
3
4export function DebugInfo() {
7
8 // Override console methods to capture logs
9 React.useEffect(() => {
10 const originalConsoleLog = console.log;
11 const originalConsoleError = console.error;
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { Component, ErrorInfo, ReactNode } from "https://esm.sh/react@18.2.0?dev";
3
4interface Props {
5 children: ReactNode;
6 fallback?: ReactNode;
7}
8
37 }
38
39 render(): ReactNode {
40 if (this.state.hasError) {
41 // You can render any custom fallback UI
1/** @jsxImportSource https://esm.sh/react@18.3.1 */
2import { render, React } from "https://esm.town/v/jxnblk/reactstream/index.tsx";
3
4function App() {
5 const [count, setCount] = React.useState(0);
6
7 return (
8 <html>
9 <body>
10 <h1>ReactStream</h1>
11 <p>React SSR with client-side hydration in Val Town</p>
12 <pre>{count}</pre>
13 <button onClick={() => setCount(count - 1)}>-</button>