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=168&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 9781 results for "react"(2360ms)

SimpleAudioPlayerPWAindex.ts5 matches

@dcm31Updated 2 weeks 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
5// Available TTS voices
48 }, []);
49
50 const handleTextChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
51 setText(e.target.value);
52 };
93 };
94
95 const handleSeek = (e: React.ChangeEvent<HTMLInputElement>) => {
96 if (!audioRef.current) return;
97 const newTime = parseFloat(e.target.value);

SimpleAudioPlayerindex.ts5 matches

@dcm31Updated 2 weeks ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useRef, useEffect } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function AudioPlayer() {
37 }, []);
38
39 const handleTextChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
40 setText(e.target.value);
41 };
79 };
80
81 const handleSeek = (e: React.ChangeEvent<HTMLInputElement>) => {
82 if (!audioRef.current) return;
83 const newTime = parseFloat(e.target.value);

cerebras_coderindex.ts10 matches

@pedro169Updated 2 weeks 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>

ProtoRunsSignIn.tsx2 matches

@nbbaierUpdated 2 weeks ago
1/** @jsxImportSource https://esm.sh/react@19.1.0 */
2import { useActionState, useContext } from "https://esm.sh/react@19.1.0";
3import { ATProtoContext } from "../context.ts";
4

ProtoRunsRunForm.tsx2 matches

@nbbaierUpdated 2 weeks ago
1/** @jsxImportSource https://esm.sh/react@19.1.0 */
2import { useActionState, useContext } from "https://esm.sh/react@19.1.0";
3import { runSchemaMap } from "../../shared/run_lexicon.ts";
4import { ATProtoContext } from "../context.ts";

ProtoRunsindex.tsx2 matches

@nbbaierUpdated 2 weeks ago
1/** @jsxImportSource https://esm.sh/react@19.1.0 */
2import { createRoot } from "https://esm.sh/react-dom@19.1.0/client";
3import { App } from "./components/App.tsx";
4import { BrowserOAuthClient, OAuthSession } from "https://esm.sh/@atproto/oauth-client-browser@0.3.15"

ProtoRunscontext.ts1 match

@nbbaierUpdated 2 weeks ago
1import { createContext } from "https://esm.sh/react@19.1.0";
2import {
3 BrowserOAuthClient,

ProtoRunsApp.tsx2 matches

@nbbaierUpdated 2 weeks ago
1/** @jsxImportSource https://esm.sh/react@19.1.0 */
2import { useContext, useState } from "https://esm.sh/react@19.1.0";
3import { ATProtoContext } from "../context.ts";
4import { RunForm } from "./RunForm.tsx";

ciphermain.tsx5 matches

@baoUpdated 2 weeks ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { createRef, useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
4
5const quoteCount = 3186;
329 const [isRevealed, setIsRevealed] = useState(false);
330 const [currentFocusIndex, setCurrentFocusIndex] = useState<number | null>(null);
331 const inputRefs = useRef<React.RefObject<HTMLInputElement>[]>([]);
332 const [copied, setCopied] = useState(false);
333 const [knownTextsShown, setKnownTextsShown] = useState(false);
472 };
473
474 const handleKeyDown = (index: number, event: React.KeyboardEvent<HTMLInputElement>) => {
475 if (!cipher) return;
476

keyboardNtfymain.tsx4 matches

@curtcoxUpdated 2 weeks ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { renderToString } from "npm:react-dom@18.2.0/server";
3
4import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
5import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
6
7// ⚙️ CHANGE THIS TO YOUR DESIRED NTFY TOPIC (and append any query string for tokens, etc.)

StarterPackFeeds10 file matches

@moeUpdated 5 hours ago
Hono + React + Tailwind + Farcaster Mini App Starter Project

new_website

@wolfUpdated 11 hours 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