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

reactRouter7home.tsx1 match

@justbe•Updated 2 months ago
1/** @jsxImportSource npm:react */
2
3export default function Home() {

reactRouter7entry.server.tsx3 matches

@justbe•Updated 2 months ago
1/** @jsxImportSource npm:react */
2import { renderToString } from "npm:react-dom/server";
3import { createStaticHandler, createStaticRouter, StaticRouterProvider } from "npm:react-router";
4
5import routes from "./routes/index.ts";

reactRouter7entry.client.tsx4 matches

@justbe•Updated 2 months ago
1import { createElement, StrictMode } from "npm:react";
2import { hydrateRoot } from "npm:react-dom/client";
3import { createBrowserRouter } from "npm:react-router";
4import { RouterProvider } from "npm:react-router/dom";
5import routes from "./routes/index.ts";
6

reactRouter7about.loader.ts1 match

@justbe•Updated 2 months ago
1import { data } from "npm:react-router";
2
3export default async function load() {

cerebras_coderindex10 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?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>

effortlessTanOwlexcitedTanReptile2 matches

@datsuuuu•Updated 2 months ago
1import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
2import React, { useState } from "https://esm.sh/react@18.2.0";
3
4const NO_PHRASES = [

tsEvalindexPage2 matches

@tmcw•Updated 2 months ago
1/** @jsxImportSource npm:react */
2import { importMap } from "https://esm.town/v/maxm/codemirrorTs/importMap";
3import { renderToString } from "npm:react-dom/server";
4
5export default async function(req: Request): Promise<Response> {

valentinemain.tsx3 matches

@nbbaier•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 React, { useState } from "https://esm.sh/react@18.2.0";
4
5const NO_PHRASES = [

orbiterHealthstatus2 matches

@stevedylandev•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";

orbiterHealthsparklineSVG1 match

@stevedylandev•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;

reactHonoStarter4 file matches

@stfnsr•Updated 17 hours ago

myNewWebsite4 file matches

@billogiovanni•Updated 18 hours ago
Starter template with client-side React & Hono server