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/$1?q=react&page=18&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 15401 results for "react"(4095ms)

TownieInputBox.tsx8 matches

@nelo•Updated 10 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useRef, useState, useEffect } from "react";
3import { PlusIcon, ArrowUpIcon, Square, XIcon } from "./icons.tsx";
4import { processFiles } from "../utils/images.ts";
15} : {
16 value: string;
17 onChange: (e: React.KeyboardEvent<HTMLInputElement>) => void;
18 onSubmit: (event: any) => void;
19 onCancel: () => void;
97 setImages: (images: (string|null)[]) => void;
98 running: boolean;
99 children: React.ReactNode;
100}) {
101 const dragging = useImageDrop({ images, setImages, running });
122 const [dragging, setDragging] = useState<boolean>(false);
123
124 const onDragEnter = (e: React.DragEvent) => {
125 e.preventDefault();
126 if (!e.dataTransfer?.types.includes('Files')) return;
128 }
129
130 const onDragLeave = (e:React.DragEvent) => {
131 e.preventDefault();
132 if (!e.relatedTarget) {
135 }
136
137 const onDragOver = (e:React.DragEvent) => {
138 e.preventDefault();
139 }
140
141 const onDrop = (e:React.DragEvent) => {
142 e.preventDefault();
143 setDragging(false);

TownieInlinePreview.tsx2 matches

@nelo•Updated 10 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useContext } from "react";
3import { ProjectContext } from "./ChatRouteSingleColumn.tsx";
4import { MessageContext } from "./Messages.tsx";

Townieindex.tsx2 matches

@nelo•Updated 10 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { createRoot } from "react-dom";
3import { App } from "./components/App.tsx";
4

Townieindex.ts6 matches

@nelo•Updated 10 hours ago
187 {
188 "imports": {
189 "react": "https://esm.sh/react@18.2.0?dev",
190 "react-dom": "https://esm.sh/react-dom@18.2.0/client?dev",
191 "react-router": "https://esm.sh/react-router@7.4.0?dev&deps=react@18.2.0,react-dom@18.2.0",
192 "react-use": "https://esm.sh/react-use?dev&deps=react@18.2.0,react-dom@18.2.0",
193 "@ai-sdk/react": "https://esm.sh/@ai-sdk/react?dev&deps=react@18.2.0,react-dom@18.2.0,zod@3.24",
194 "react-markdown": "https://esm.sh/react-markdown?dev&deps=react@18.2.0,react-dom@18.2.0"
195 }
196 }

Townieicons.tsx1 match

@nelo•Updated 10 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2
3export function TownieIcon({

TownieHome.tsx4 matches

@nelo•Updated 10 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "react";
3import { Link } from "react-router";
4import { EyeIcon, FileCode2Icon, SparklesIcon, SquarePenIcon } from "./icons.tsx";
5
78 <p>Townie is built with:</p>
79 <ul>
80 <li>React frontend with TypeScript</li>
81 <li>Hono API server backend</li>
82 <li>Web Audio API for sound notifications</li>

TownieHeader.tsx4 matches

@nelo•Updated 10 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useEffect, useContext } from "react";
3import { Link, useNavigate } from "react-router";
4import { useLocalStorage } from "react-use";
5import { Circle, Volume2Icon, VolumeOffIcon } from "./icons.tsx";
6import { AppContext } from "./App.tsx";

TownieFooter.tsx1 match

@nelo•Updated 10 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2export const SOURCE_URL = "https://val.town/x/valdottown/Townie";
3

Towniefavicon.http.tsx2 matches

@nelo•Updated 10 hours ago
1/** @jsxImportSource npm:react@18.2.0 */
2import { renderToString } from "npm:react-dom@18.2.0/server";
3import { TownieIcon } from "./components/icons.tsx";
4

TownieDebugStyles.tsx2 matches

@nelo•Updated 10 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useRef, useEffect, useState } from "react";
3import { TownieIcon } from "./icons.tsx";
4import { Messages } from "./Messages.tsx";

reactHonoStarter4 file matches

@archie•Updated 19 hours ago

reactHonoStarter4 file matches

@ETLS•Updated 20 hours ago
effector
Write business logic with ease Meet the new standard for modern TypeScript development. Type-safe, reactive, framework-agnostic library to manage your business logic.
officialrajdeepsingh
Follow me if you learn more about JavaScript | TypeScript | React.js | Next.js | Linux | NixOS | Frontend Developer | https://linktr.ee/officialrajdeepsingh