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=479&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 9182 results for "react"(865ms)

rousingBronzeMandrillmain.tsx3 matches

@Learn•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 { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5// Enhanced Error Tracking Utility

EchoPromptermain.tsx4 matches

@Learn•Updated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { AnimatePresence, motion } from "https://esm.sh/framer-motion@10.12.7?deps=react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0,react-dom@18.2.0";
4import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
5
6function App() {

mediainfomain.tsx3 matches

@kkukshtel•Updated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import mediaInfoFactory from "https://esm.sh/mediainfo.js@0.2.1";
3import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
4import React from "https://esm.sh/react@18.2.0";
5import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
6

SharzPearlsmain.tsx4 matches

@sharz•Updated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useRef } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import { Upload, ImageIcon, Video, X, Check } from "https://esm.sh/lucide-react";
5
6function ProductManagementPage() {

musicalInstrumentIdentificationmain.tsx3 matches

@uday_8897•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, { useRef, useState, useEffect } from "https://esm.sh/react@18.2.0";
4
5// Enhanced Instrument configuration

importMapSupporttest.ts3 matches

@wolf•Updated 1 month ago
123 * Converts Deno import paths to equivalent esm.sh URLs
124 *
125 * @param denoPath - A Deno import path (e.g., "npm:react@18.2.0", "jsr:@std/encoding@1.0.0")
126 * @returns The equivalent esm.sh URL
127 *
128 * @example
129 * // npm packages
130 * toEsmUrl("npm:react@18.2.0") // "https://esm.sh/react@18.2.0"
131 * toEsmUrl("npm:react-dom/client") // "https://esm.sh/react-dom/client"
132 *
133 * // JSR packages

extractRecipeAImain.tsx4 matches

@Skeye•Updated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { Hono } from "https://esm.sh/hono";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import React, { useCallback, useState } from "https://esm.sh/react@18.2.0";
5
6function RecipeSection({ title, items, type = "ul" }) {
96
97 // Clean up object URL when component unmounts or image changes
98 React.useEffect(() => {
99 return () => {
100 if (imageUrl) {

chatGPTClonemain.tsx4 matches

@Bam031272•Updated 1 month 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
5interface Message {
22 }, [messages]);
23
24 const handleSubmit = async (e: React.FormEvent) => {
25 e.preventDefault();
26 if (!inputMessage.trim()) return;

cerebras_coderindex10 matches

@Learn•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>

neatBlackSwiftmain.tsx10 matches

@Learn•Updated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import Cerebras from "https://esm.sh/@cerebras/cerebras_cloud_sdk";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter";
5import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
6import { STARTER_PROMPTS } from "https://esm.town/v/92a56140-072d-11f0-a2f4-514a10b5a6b4/cerebras_coder_prompts";
7
31}: {
32 prompt: string;
33 setPrompt: React.Dispatch<React.SetStateAction<string>>;
34 handleSubmit: (e: React.FormEvent) => void;
35 handleStarterPromptClick: (promptItem: PromptItem) => void;
36}) {
117
118function App() {
119 const previewRef = React.useRef<HTMLDivElement>(null);
120 const [prompt, setPrompt] = useState("");
121 const [projectId, setProjectId] = useState<number | null>(null);
176 }
177
178 async function handleSubmit(e: React.FormEvent | string) {
179 if (typeof e !== "string") {
180 e.preventDefault();
675 </div>
676 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
677 <React.Fragment key={iframeKey}>
678 <iframe
679 srcDoc={code}
681 className="w-full grow"
682 />
683 </React.Fragment>
684 </div>
685 </div>

IClickWolf4 file matches

@vtTestLocal•Updated 9 hours ago
Starter template with client-side React & Hono server

vt-discord4 file matches

@boucher•Updated 5 days ago
Starter template with client-side React & Hono server
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