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=453&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 4680 results for "react"(390ms)

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

greenTigermain.tsx2 matches

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

wasmBlobHostmain.tsx2 matches

@maxm•Updated 11 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
9const { author, name } = extractValInfo(import.meta.url);

wasmBlobHostmain.tsx2 matches

@tmcw•Updated 11 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";
4import { Buffer } from "node:buffer";
5import { createHash } from "node:crypto";
6import { renderToString } from "npm:react-dom/server";
7
8const { author, name } = extractValInfo(import.meta.url);

valwritermain.tsx1 match

@stevekrouse•Updated 11 months ago
10 {
11 user: "website that shows the current time",
12 content: `/** @jsxImportSource npm:react */
13export default function() {
14 return <h1>{new Date().toLocaleTimeString()}</h1>;

hono_react_ssrmain.tsx6 matches

@stevekrouse•Updated 11 months ago
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
3import { useEffect, useState } from "https://esm.sh/react@18.2.0";
4import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
5import { html } from "https://esm.town/v/stevekrouse/html";
6import Hono from "https://esm.sh/hono";
7
8// button that's disabled until client react hydrates
9export const Button = (props) => {
10 const [clientHydrated, setClientHydrated] = useState(false);
56 const props = await loader(req);
57 const script = `
58 import { hydrateRoot } from "https://esm.sh/react-dom@18.2.0/client";
59 import { jsx as _jsx } from "https://esm.sh/react@18.2.0/jsx-runtime";
60 import { Component } from "https://esm.town/v/${author}/${name}";
61

hono_react_ssrREADME.md2 matches

@stevekrouse•Updated 11 months ago
1# Hono React SSR
2
3Development in progress
4
5Migrated from folder: Archive/hono_react_ssr

react-router-starter-remix-13 file matches

@jxnblk•Updated 2 days ago

reactHonoStarter4 file matches

@stfnsr•Updated 3 days ago