Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/?q=react&page=377&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=react

Returns an array of strings in format "username" or "username/projectName"

Found 4466 results for "react"(504ms)

apiifyREADME.md4 matches

@wolfโ€ขUpdated 1 month ago
1# React Hono Starter
2
3This app is a starter template for client-side React and server-side Hono.
4
5- **Remix** this starter template on the top right to get started.
7- The **entrypoint** is `/backend/index.ts`. That's the backend HTTP server, which also serves the all the frontend assets.
8
9- The **client-side entrypoint** is `/frontend/index.html`, which in turn imports `/frontend/index.tsx`, which in turn imports the React app from `/frontend/components/App.tsx`.
10
11[React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a fuller featured example project, with a SQLite database table, queries, client-side CSS and a favicon, and some shared code that runs on both client and server.

apiifyindex.tsx2 matches

@wolfโ€ขUpdated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import { App } from "./components/App.tsx";
4

apiifyindex.html1 match

@wolfโ€ขUpdated 1 month ago
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>React Hono Val Town Starter</title>
7 <link rel="stylesheet" href="/public/style.css">
8 <link rel="icon" href="/public/favicon.svg" sizes="any" type="image/svg+xml">

testmar24README.md4 matches

@charmaineโ€ขUpdated 1 month ago
1# Todo List App
2
3A simple todo list application built for Val Town using React, Hono, and SQLite.
4
5## Features
20โ”œโ”€โ”€ frontend/
21โ”‚ โ”œโ”€โ”€ components/
22โ”‚ โ”‚ โ””โ”€โ”€ App.tsx # Main React component
23โ”‚ โ”œโ”€โ”€ index.html # HTML template
24โ”‚ โ””โ”€โ”€ index.tsx # React entry point
25โ””โ”€โ”€ shared/
26 โ””โ”€โ”€ types.ts # Shared TypeScript interfaces
38### Frontend
39
40- Built with React
41- Uses Tailwind CSS for styling
42- Communicates with the backend API

testmar24index.tsx3 matches

@charmaineโ€ขUpdated 1 month ago
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

testmar24App.tsx3 matches

@charmaineโ€ขUpdated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { Todo, CreateTodoInput, UpdateTodoInput } from "../../shared/types.ts";
4
37
38 // Create a new todo
39 const createTodo = async (e: React.FormEvent) => {
40 e.preventDefault();
41 if (!newTodoText.trim()) return;

cerebras_coderindex10 matches

@draxโ€ขUpdated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0";
3import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter?deps=react@18.2.0,react-dom@18.2.0";
4import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
5import STARTER_PROMPTS from "./starter-prompts.js";
6
30}: {
31 prompt: string;
32 setPrompt: React.Dispatch<React.SetStateAction<string>>;
33 handleSubmit: (e: React.FormEvent) => void;
34 handleStarterPromptClick: (promptItem: PromptItem) => void;
35}) {
116
117function App() {
118 const previewRef = React.useRef<HTMLDivElement>(null);
119 const [prompt, setPrompt] = useState("");
120 const [projectId, setProjectId] = useState<number | null>(null);
174 }
175
176 async function handleSubmit(e: React.FormEvent | string) {
177 if (typeof e !== "string") {
178 e.preventDefault();
673 </div>
674 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
675 <React.Fragment key={iframeKey}>
676 <iframe
677 srcDoc={code}
679 className="w-full grow"
680 />
681 </React.Fragment>
682 </div>
683 </div>

ExpenseTrackerExpense4 matches

@AryanChau0310โ€ขUpdated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
4
5// Expense interface to define structure
35
36 // Function to add a new expense
37 const addExpense = async (e: React.FormEvent) => {
38 e.preventDefault();
39
3}
4
5import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom";
6import HomePage from "./HomePage";
7import Products from "./Products";

openTownieMadeThis5index.ts1 match

@charmaineโ€ขUpdated 1 month ago
28 "Memory card game",
29 "Word association game",
30 "Reaction time tester",
31 "Trivia quiz",
32 "Typing speed test",

react-router-starter-remix-13 file matches

@jxnblkโ€ขUpdated 1 day ago

reactHonoStarter4 file matches

@stfnsrโ€ขUpdated 2 days ago