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/$%7Bart_info.art.src%7D?q=react&page=1198&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 16310 results for "react"(4582ms)

OpenTownieChatMessages.tsx2 matches

@maxm•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3import { MessageItem } from "./MessageItem.tsx";
4import { ErrorDisplay } from "./ErrorDisplay.tsx";

OpenTownieChatInput.tsx6 matches

@maxm•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0?dev";
3import { ImageUpload } from "./ImageUpload.tsx";
4
5interface ChatInputProps {
6 input: string;
7 handleInputChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
8 handleSubmit: (e: React.FormEvent<HTMLFormElement>) => void;
9 running: boolean;
10 images: (string | null)[];
11 setImages: React.Dispatch<React.SetStateAction<(string | null)[]>>;
12}
13
38 }, []);
39
40 const handleFormSubmit = (e: React.FormEvent<HTMLFormElement>) => {
41 e.preventDefault();
42 const validImages = images.filter((img): img is string => typeof img === "string");

OpenTownieChatHeader.tsx2 matches

@maxm•Updated 2 months ago
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

OpenTownieBranchControl.tsx3 matches

@maxm•Updated 2 months ago
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);

OpenTownieApp.tsx3 matches

@maxm•Updated 2 months ago
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";

OpenTownieApiKeyWarning.tsx2 matches

@maxm•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3
4interface ApiKeyWarningProps {

wisePurpleAnteatermain.tsx3 matches

@maxm•Updated 2 months ago
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";
4
5const STEPS = 16;

trAIderAgentApp.tsx3 matches

@kamalnrf•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useChat } from "https://esm.sh/@ai-sdk/react?deps=react@18.2.0&react-dom@18.2.0";
3import DOMPurify from "https://esm.sh/dompurify@3.0.3";
4import { marked } from "https://esm.sh/marked@4.3.0";
5import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
6
7export function App() {

tolerantGreenLadybugmain.tsx6 matches

@Alifdvl•Updated 2 months 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, useRef, useState } from "https://esm.sh/react@18.2.0";
4
5function KixLogo() {
71
72 // Add missing methods
73 const handleImageUpload = (e: React.ChangeEvent<HTMLInputElement>) => {
74 const file = e.target.files?.[0];
75 setError(null);
154 };
155
156 const handleMouseDown = (e: React.MouseEvent) => {
157 if (!isCropping || !imageRef.current) return;
158 const rect = imageRef.current.getBoundingClientRect();
163 };
164
165 const handleMouseMove = (e: React.MouseEvent) => {
166 if (!isCropping || !imageRef.current || !startPoint) return;
167 const rect = imageRef.current.getBoundingClientRect();

OutfitPlannermain.tsx3 matches

@ChidinmaOgwumike•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5// Expanded aesthetic and color matching utility

reactHonoStarter4 file matches

@halfstack•Updated 12 hours ago

MiniAppStarter10 file matches

@moe•Updated 14 hours ago
Hono + React + Tailwind + Farcaster Mini App Starter Project
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