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/$%7Burl%7D?q=react&page=7&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 9067 results for "react"(554ms)

TownieNewProjectRoute.tsx3 matches

@std•Updated 11 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useState } from "https://esm.sh/react@18.2.0?dev";
3import { useNavigate } from "https://esm.sh/react-router@7?dev&deps=react@18.2.0&react-dom@18.2.0";
4import { useCreateProject } from "../hooks/useCreateProject.tsx";
5

TownieMessageTimer.tsx2 matches

@std•Updated 11 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useEffect, useState } from "https://esm.sh/react@18.2.0?dev";
3
4const formatTime = (ms: number): string => {

TownieMessages.tsx6 matches

@std•Updated 11 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import ReactMarkdown from "https://esm.sh/react-markdown?dev&deps=react@18.2.0&react-dom@18.2.0";
3
4import { Loading } from "./Loading.tsx";
102function TextPart ({ part }) {
103 return (
104 <ReactMarkdown>
105 {part.text}
106 </ReactMarkdown>
107 );
108}
227 {message.parts.map((part, i) => part.type === "text" ? (
228 <div key={i} className="user-message">
229 <ReactMarkdown>
230 {part.text}
231 </ReactMarkdown>
232 </div>
233 ) : (

TownieLoginRoute.tsx3 matches

@std•Updated 11 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useState, useEffect } from "https://esm.sh/react@18.2.0?dev";
3import { useNavigate } from "https://esm.sh/react-router@7?dev&deps=react@18.2.0&react-dom@18.2.0";
4import { useAuth } from "../hooks/useAuth.tsx";
5

TownieLoading.tsx1 match

@std•Updated 11 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2
3export function Loading () {

TownieLayoutRoute.tsx2 matches

@std•Updated 11 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { Outlet } from "https://esm.sh/react-router@7?dev&deps=react@18.2.0&react-dom@18.2.0";
3import { Header } from "./Header.tsx";
4

TownieInputBox.tsx8 matches

@std•Updated 11 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useRef, useState, useEffect } from "https://esm.sh/react@18.2.0?dev";
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);

Townieindex.tsx2 matches

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

Townieicons.tsx1 match

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

TownieHome.tsx4 matches

@std•Updated 11 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3import { Link } from "https://esm.sh/react-router@7?dev&deps=react@18.2.0&react-dom@18.2.0";
4import {
5 SquarePenIcon,
98 </p>
99 <ul>
100 <li>React frontend with TypeScript</li>
101 <li>Hono API server backend</li>
102 <li>Web Audio API for sound notifications</li>

vt-discord4 file matches

@boucher•Updated 3 days ago
Starter template with client-side React & Hono server

diceRollerUI1 file match

@dcm31•Updated 4 days ago
A web-based dice roller using React on Val Town
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