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//%22script.js/%22?q=react&page=3&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 21591 results for "react"(973ms)

statusstatus2 matches

@kellyiUpdated 1 day ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { sqlite } from "https://esm.town/v/std/sqlite?v=6";
3import { parseProject } from "https://esm.town/v/std/utils/index.ts";
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

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

linkInBioTemplatemain.tsx2 matches

@kellyiUpdated 1 day ago
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
3
4export default async function(req: Request) {

Kavimain.ts3 matches

@kavidharshini922Updated 1 day ago
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
3
4// Learn more: https://docs.val.town/vals/http/jsx/
5export const reactExample = (request: Request) =>
6 new Response(renderToString(<div>Test {1 + 1}</div>), {
7 headers: {

wa-hono-reactindex.html1 match

@nbbaierUpdated 1 day ago
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>React Hono Val Town Starter</title>
7 <!-- <link rel="stylesheet" href="/frontend/style.css"> -->
8 <link rel="icon" href="/frontend/favicon.svg" type="image/svg+xml">

cerebras_coderindex.ts10 matches

@rrosttUpdated 1 day 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>
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, {
3 useEffect,
4 useState,
5} from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
6import { createPortal } from "https://esm.sh/react-dom@18.2.0?deps=react@18.2.0,react-dom@18.2.0";
7import { NotionBlocks } from "./NotionBlock.tsx";
8import { NotionProperty } from "./NotionProperty.tsx";
34
35If you want more interactivity, check out this
36[React starter](https://www.val.town/x/std/reactHonoStarter).
37
38### ← favicon.svg
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3import { blob } from "https://esm.town/v/std/blob";

demoLayout.tsx3 matches

@shishtUpdated 1 day ago
1/** @jsxImportSource npm:react@18.2.0 */
2import type { ReactNode } from "npm:react@18.2.0";
3
4export function Layout({ children }: { children: ReactNode }) {
5 return (
6 <html lang="en">

wa-hono-react4 file matches

@nbbaierUpdated 1 day ago
react
franky47
Freelance software engineer, open-sourcerer, speaker. Building `nuqs`, a type-safe search params state manager for React.