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=403&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 4213 results for "react"(406ms)

test_projectscript.ts3 matches

@charmaine•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import confetti from "https://esm.sh/canvas-confetti@1.6.0";
3import katex from "https://esm.sh/katex@0.16.4";
4import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
5import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
6
7function renderMath(text) {

cerebras_coderindex10 matches

@ramachandrareddy•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?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>

blob_adminapp.tsx5 matches

@stevekrouse•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 { useDropzone } from "https://esm.sh/react-dropzone?deps=react@18.2.0,react-dom@18.2.0";
4import React, { ReactNode, useCallback, useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
5import { LoginWithGoogleButton } from "https://esm.town/v/stevekrouse/LoginWithGoogleButton";
6
7interface TooltipProps {
8 children: ReactNode;
9 content: string;
10}

blob_adminindex2 matches

@stevekrouse•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { type Context, Hono } from "https://esm.sh/hono";
3import { debounce } from "https://esm.sh/lodash-es";
4import React, { ReactNode, useCallback, useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
5import { parseProject } from "https://esm.town/v/std/parseImportMeta/project";
6import { lastlogin } from "https://esm.town/v/stevekrouse/lastlogin_safe";

statusstatus2 matches

@safone•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { parseProject } from "https://esm.town/v/std/parseImportMeta/project";
3import { sqlite } from "https://esm.town/v/std/sqlite?v=6";
4import { html } from "https://esm.town/v/stevekrouse/html";
5import { renderToString } from "npm:react-dom@18.2.0/server";
6import config from "./config.json" with { type: "json" };
7import { SparklineSVG } from "./sparklineSVG";

statussparklineSVG1 match

@safone•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2export function SparklineSVG({ strokeWidth = 2, data = [], fill = "none", stroke = "black" }) {
3 const padding = 2;

mathOfTheDayaccomplishedOrangePenguin3 matches

@charmaine•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import confetti from "https://esm.sh/canvas-confetti@1.6.0";
3import katex from "https://esm.sh/katex@0.16.4";
4import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
5import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
6
7function renderMath(text) {

parseImportMetaproject.test2 matches

@std•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/preact */
2import { expect } from "jsr:@std/expect";
3import { makeBadge } from "npm:badge-maker";
4import { render } from "npm:preact-render-to-string";
5import prettyMilliseconds from "npm:pretty-ms";
6import { parseProject } from "./project";

stevekrouse_dot_comproposal.tsx2 matches

@stevekrouse•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { renderToString } from "npm:react-dom@18.2.0/server";
3import { Link } from "../helpers.tsx";
4

stevekrouse_dot_comhelpers.tsx2 matches

@stevekrouse•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3const linkClass = "text-blue-500 hover:underline";
4export const Link = (
5 { children, href }: {
6 children?: React.ReactNode;
7 href: string;
8 },

reactHonoStarter4 file matches

@stfnsr•Updated 1 day ago

myNewWebsite4 file matches

@billogiovanni•Updated 1 day ago
Starter template with client-side React & Hono server