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=361&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 4650 results for "react"(422ms)

eink-framenews.tsx3 matches

@michaelwschultz•Updated 1 month ago
1/** @jsxImportSource https://esm.sh/react */
2import React from "https://esm.sh/react";
3import { renderToString } from "https://esm.sh/react-dom/server/";
4import GetNews from "../api/news.ts";
5import { BodyWrapper, Content, Footer, Header, Headline } from "../components.tsx";

eink-framehemolog.tsx3 matches

@michaelwschultz•Updated 1 month ago
1/** @jsxImportSource https://esm.sh/react */
2import React from "https://esm.sh/react";
3import { renderToString } from "https://esm.sh/react-dom/server";
4import GetLogs, { type HEMOLOG_TREATMENT } from "../api/hemolog.ts";
5import { BodyWrapper, Content, Footer, Header, Headline } from "../components.tsx";

eink-frameapod.tsx3 matches

@michaelwschultz•Updated 1 month ago
1/** @jsxImportSource https://esm.sh/react */
2import React from "https://esm.sh/react";
3import { renderToString } from "https://esm.sh/react-dom/server/";
4import GetAPOD, { type APOD } from "../api/apod.ts";
5import { BodyWrapper, Header } from "../components.tsx";

eink-framefontsTest.tsx3 matches

@michaelwschultz•Updated 1 month ago
1/** @jsxImportSource https://esm.sh/react */
2import React from "https://esm.sh/react";
3import { renderToString } from "https://esm.sh/react-dom/server";
4import { BodyWrapper, Content, Footer, Header, Headline } from "../components.tsx";
5

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

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>

litebriteApp.tsx2 matches

@bradley•Updated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useEffect, useState } from "https://esm.sh/react@18.2.0";
3
4type LEDProps = {

OpenTownieDirectoryTree.tsx4 matches

@stevekrouse•Updated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useEffect, useState } from "https://esm.sh/react@18.2.0?dev";
3
4// Type definitions
144 };
145
146 const handleCheckChange = (e: React.ChangeEvent<HTMLInputElement>) => {
147 onCheck(node.path, e.target.checked);
148 };
149
150 const handleNodeClick = (e: React.MouseEvent) => {
151 // Don't toggle checkbox if clicking on the expand/collapse arrow
152 if ((e.target as HTMLElement).classList.contains("toggle-expand")) {

frameweather.tsx3 matches

@charmaine•Updated 1 month ago
1/** @jsxImportSource https://esm.sh/react */
2import React from "https://esm.sh/react";
3import { renderToString } from "https://esm.sh/react-dom/server";
4import { BodyWrapper, Content, Footer, Header, Headline } from "../components.tsx";
5

framenews.tsx3 matches

@charmaine•Updated 1 month ago
1/** @jsxImportSource https://esm.sh/react */
2import React from "https://esm.sh/react";
3import { renderToString } from "https://esm.sh/react-dom/server/";
4import GetNews from "../api/news.ts";
5import { BodyWrapper, Content, Footer, Header, Headline } from "../components.tsx";

react-router-starter-remix-13 file matches

@jxnblk•Updated 2 days ago

reactHonoStarter4 file matches

@stfnsr•Updated 3 days ago