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/image-url.jpg%20%22Image%20title%22?q=react&page=804&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 10246 results for "react"(2479ms)

BikramNpExplorerAppmain.tsx4 matches

@air•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function App() {
13 const [isLoading, setIsLoading] = useState(false);
14
15 const handleSubmit = async (e: React.FormEvent) => {
16 e.preventDefault();
17 if (!input.trim()) return;

WiFi_Vision_Systemmain.tsx3 matches

@AIWB•Updated 3 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 WifiVisionSystem() {

mileiShowGraphmain.tsx4 matches

@nulo•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useEffect, useState } from "https://esm.sh/react@18.2.0?deps=react-dom@18.2.0";
3// x
4import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0"; //
5import {
6 CartesianGrid,
12 XAxis,
13 YAxis,
14} from "https://esm.sh/recharts@2.15.1?deps=react@18.2.0,react-dom@18.2.0";
15
16function App({ tweetData }) {

reactRouter7entry.client.tsx5 matches

@charmaine•Updated 3 months ago
1import { hydrateRoot } from "https://esm.sh/react-dom@18.2.0/client";
2import { RouterProvider } from "https://esm.sh/react-router@7.1.3/dom?deps=react@18.2.0,react-dom@18.2.0";
3import { createBrowserRouter } from "https://esm.sh/react-router@7.1.3?deps=react@18.2.0,react-dom@18.2.0";
4import { StrictMode } from "https://esm.sh/react@18.2.0";
5import routes from "./routes/index.ts";
6
10});
11
12hydrateRoot(document, React.createElement(RouterProvider, { router: router }));
13
14console.log("ladededa testing pull requests");

tidyLimeRoundwormmain.tsx4 matches

@stevekrouse•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useEffect, useState } from "https://esm.sh/react@18.2.0?deps=react-dom@18.2.0";
3// x
4import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0"; //
5import {
6 CartesianGrid,
12 XAxis,
13 YAxis,
14} from "https://esm.sh/recharts@2.7.2?deps=react@18.2.0,react-dom@18.2.0";
15
16function App({ tweetData }) {

brightSalmonHoverflymain.tsx4 matches

@maxm•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useEffect, useState } from "https://esm.sh/react@18.2.0?deps=react-dom@18.2.0";
3// x
4import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0"; //
5import {
6 CartesianGrid,
12 XAxis,
13 YAxis,
14} from "https://esm.sh/recharts@2.7.2?deps=react@18.2.0,react-dom@18.2.0";
15
16function App({ tweetData }) {

regexToBrainrotmain.tsx20 matches

@stainless_em•Updated 3 months ago
3import {
4 jsonpatch,
5 React as ClientReact,
6 setJsx,
7 TextLineStream,
8 toIt,
9} from "https://stainless_em-brainrotdeps.web.val.run/2/jsx-runtime";
10const React = typeof document !== "undefined" ? ClientReact : await import(
11 `npm:react@19`
12);
13const { Children, toChildArray, cloneElement, useMemo, useReducer, useState, useEffect } = React;
14
15function hydrateReactElements(obj: any): any {
16 if (obj == null || typeof obj !== "object") {
17 return obj;
19
20 if ("key" in obj && "props" in obj) {
21 return React.createElement(obj.type || React.Fragment, hydrateReactElements(obj.props));
22 }
23
24 if (Array.isArray(obj)) {
25 return obj.map(item => hydrateReactElements(item));
26 }
27
28 const result: any = {};
29 for (const [key, value] of Object.entries(obj)) {
30 result[key] = hydrateReactElements(value);
31 }
32 return result;
43}
44
45const addCursorToLastTextNode = (element: any): React.ReactElement => {
46 if (!(element !== null && typeof element === "object" && "props" in element)) {
47 return element;
155
156 const hydratedBrainrotExplanation = useMemo(() => {
157 const hydrated = hydrateReactElements(brainrotExplanation);
158 if (isStreaming && hydrated?.tree) {
159 return {
165 return {
166 ...hydrated,
167 tree: React.createElement(hydrated.tree.type, {
168 ...hydrated.tree.props,
169 children: [
286
287function client() {
288 React.hydrate(
289 <App state={JSON.parse(document.getElementById("_state_")!.textContent!)} />,
290 document.getElementById("root")!,
299 const [
300 { getRandomRegexExplanation, saveRegexExplanation, getRegexExplanationById },
301 ReactMarkdown,
302 { OpenAI },
303 { renderToString },
305 ] = await Promise.all([
306 import("https://esm.town/v/stainless_em/brainrotdb"),
307 import("npm:react-markdown@7"),
308 import("https://esm.town/v/std/openai"),
309 import("npm:react-dom@19/server.browser"),
310 import("npm:react@19/jsx-runtime"),
311 ]);
312 setJsx(jsx, jsxs, Fragment);
329 tree: (
330 <div className="content slideIn" data-id={cached.id} data-regex={regex}>
331 {ReactMarkdown.default({ children: cached.explanation })}
332 </div>
333 ),
391 tree: (
392 <div className="content slideIn">
393 {ReactMarkdown.default({ children: message })}
394 </div>
395 ),
417 tree: (
418 <div className="content slideIn" data-id={id} data-regex={regex}>
419 {ReactMarkdown.default({ children: message })}
420 </div>
421 ),
468 explanation: (
469 <div className="content" data-id={route[1]} data-regex={share.regex}>
470 {ReactMarkdown.default({ children: share.explanation })}
471 </div>
472 ),

DualLangWebSpeechAPImain.tsx3 matches

@AIWB•Updated 3 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, { useCallback, useRef, useState } from "https://esm.sh/react@18.2.0";
4
5function App() {

cerebras_codermain.tsx10 matches

@HArS•Updated 3 months 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?deps=react@18.2.0";
4import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter?deps=react@18.2.0,react-dom@18.2.0";
5import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
6import { STARTER_PROMPTS } from "https://esm.town/v/stevekrouse/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);
175 }
176
177 async function handleSubmit(e: React.FormEvent | string) {
178 if (typeof e !== "string") {
179 e.preventDefault();
674 </div>
675 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
676 <React.Fragment key={iframeKey}>
677 <iframe
678 srcDoc={code}
680 className="w-full grow"
681 />
682 </React.Fragment>
683 </div>
684 </div>

uiComponentPlaygroundmain.tsx3 matches

@aazad•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5// Accordion Component

StarterPackFeeds11 file matches

@moe•Updated 4 hours ago
Hono + React + Tailwind + Farcaster Mini App Starter Project

FullstackStarter30 file matches

@wolf•Updated 10 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