linkInBioTemplatemain.tsx2 matches
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
34export default async function(req: Request) {
projectConverterDraftconverter.ts12 matches
194try {
195// Detect basic app characteristics
196const usesReact = input.includes("@jsxImportSource") || input.includes("createRoot");
197198// Extract the CSS
261});
262263// Handle React apps
264if (usesReact) {
265// Create App component
266let appComponentContent = appContent
267? `/** @jsxImportSource https://esm.sh/react@18.2.0 */
268import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
269import { AppData } from "../../shared/types.ts";
270280281export default App;`
282: `/** @jsxImportSource https://esm.sh/react@18.2.0 */
283import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
284import { AppData } from "../../shared/types.ts";
285333files.push({
334path: "frontend/index.tsx",
335content: `/** @jsxImportSource https://esm.sh/react@18.2.0 */
336import React from "https://esm.sh/react@18.2.0";
337import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
338import App from "./components/App.tsx";
339374});
375} else {
376// Create a basic HTML file if not using React
377files.push({
378path: "frontend/index.html",
484485- \`backend/\` - Server code using Hono
486- \`frontend/\` - ${usesReact ? "React components" : "HTML, CSS and JavaScript"} and static assets
487- \`shared/\` - Types and utilities shared between frontend and backend
488
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
4import { v4 as uuidv4 } from "https://esm.sh/uuid";
5
prominentCopperPumamain.tsx4 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function App() {
8const [error, setError] = useState('');
910const handleDownload = async (e: React.FormEvent) => {
11e.preventDefault();
12setError('');
tidyPlumBonobomain.tsx3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect, useRef } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45// Rest of the existing game code remains the same...
honoStarterApp.tsx3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useState } from "https://esm.sh/react@18.2.0";
34export function App() {
6return (
7<div>
8<h1>Val Town React + Hono Starter</h1>
9I've been clicked
10<button type="button" onClick={() => setClicked((c) => c + 1)}>
28});
2930// Add the /convert endpoint to handle the React app's fetch calls
31app.post("/convert", async (c) => {
32try {
projectConverterDraftREADME.md2 matches
8- `style.css` - CSS styles for the application
9- `favicon.svg` - Icon for the application
10- `index.tsx` - JavaScript entry point for React
11- `components/` - React components
projectConverterDraftindex.tsx3 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import App from "./components/App.tsx";
5
projectConverterDraftApp.tsx2 matches
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { Todo } from "../../shared/types.ts";
4