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=439&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 4495 results for "react"(449ms)

valTownChatGPTmain.tsx2 matches

@maxm•Updated 10 months ago
1/** @jsxImportSource https://esm.sh/react */
2import OpenAI from "npm:openai";
3import { renderToString } from "npm:react-dom/server";
4
5// This uses by personal API key, you'll need to provide your own if

chatGPTmain.tsx2 matches

@stevekrouse•Updated 10 months ago
1/** @jsxImportSource https://esm.sh/react */
2import { Hono } from "npm:hono@3";
3import OpenAI from "npm:openai";
4import { renderToString } from "npm:react-dom/server";
5
6const jsxResponse = (jsx) => {

asciiNycCamerasmain.tsx2 matches

@maxm•Updated 10 months ago
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
3
4import valTownBadge from "https://esm.town/v/jxnblk/valTownBadge?v=16";

dateme_faq_reactmain.tsx1 match

@stevekrouse•Updated 10 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3let linkClass = "text-sky-600 hover:text-sky-500";

reacttldrawclientmain.tsx5 matches

@tmcw•Updated 10 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 **/
2// Make sure to only import from esm.sh (npm: specifier are not supported in the browser)
3import ReactDOM from "https://esm.sh/react-dom@18.2.0";
4import React from "https://esm.sh/react@18.2.0";
5import { useState } from "https://esm.sh/react@18.2.0";
6import { Tldraw } from "https://esm.sh/tldraw@2.1.0";
7// import "https://esm.sh/tldraw/tldraw.css";
18
19// The app will be rendered inside the root div
20const root = ReactDOM.createRoot(document.getElementById("root"));
21root.render(<App />);

HTreeTreePmain.tsx2 matches

@maxm•Updated 10 months ago
1/** @jsxImportSource https://esm.sh/react */
2import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
3import { blob } from "https://esm.town/v/std/blob?v=12";
5import { createHash } from "node:crypto";
6import base32Encode from "npm:base32-encode";
7import { renderToString } from "npm:react-dom/server";
8
9// Uncomment to run migrations

freshChartsExamplemain.tsx5 matches

@maxm•Updated 11 months ago
1/** @jsxImportSource https://esm.sh/react */
2import React from "https://esm.sh/react";
3
4// fresh_charts expects React to be available on globalThis/window, not sure why!
5globalThis.React = React;
6import { Chart, renderChart } from "https://deno.land/x/fresh_charts/mod.ts";
7import { ChartColors, transparentize } from "https://deno.land/x/fresh_charts/utils.ts";
8import { renderToString } from "npm:react-dom/server";
9
10const chart = () => ({

valTownAnalyticsmain.tsx2 matches

@maxm•Updated 11 months ago
1/** @jsxImportSource https://esm.sh/react */
2import { DateTime } from "https://cdn.skypack.dev/luxon@2.3.2";
3import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
4import { sqlite } from "https://esm.town/v/std/sqlite?v=6";
5import { renderToString } from "npm:react-dom/server";
6
7const { author, name, httpEndpoint } = extractValInfo(import.meta.url);

bloomingButtonREADME.md2 matches

@maxm•Updated 11 months ago
8
9```tsx
10/** @jsxImportSource https://esm.sh/react */
11import { renderToString } from "npm:react-dom/server";
12
13export default async function(req: Request): Promise<Response> {

httpStatusBehaviormain.tsx2 matches

@maxm•Updated 11 months ago
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
3
4// dprint-ignore

react-router-starter-remix-13 file matches

@jxnblk•Updated 1 day ago

reactHonoStarter4 file matches

@stfnsr•Updated 2 days ago