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=426&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 4466 results for "react"(553ms)

valtowntownmain.tsx3 matches

@charmaine•Updated 3 months ago
1/** @jsxImportSource npm:react */
2import { serveRequest } from "https://esm.town/v/maxm/reqEvaltown";
3import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
4import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
5import { Hono } from "npm:hono";
6import React from "npm:react";
7import { renderToString } from "npm:react-dom/server";
8
9const { httpEndpoint } = extractValInfo(import.meta.url);

OpenTownieindex.tsx3 matches

@pomdtr•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { ValTown } from "https://esm.sh/@valtown/sdk";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
5import { generateCodeAnthropic, makeFullPrompt } from "./backend/generateCode";
6

OpenTowniesystem_prompt.txt4 matches

@pomdtr•Updated 3 months ago
46 If needed and if the user asks for something that requires persistence, use Val Town SQLite or Blob storage. Use the val's `import.meta.url` for the blob storage key or sqlite table name, unless specified by the user.
47
48 * If you use any React library, use esm.sh and pin its React version to 18.2.0 and its ReactDOM version to 18.2.0 by adding `?deps=react@18.2.0,react-dom@18.2.0` to the end of the URL. If the user is facing a client-side error where nothing is being rendered, check if all React dependencies and sub-dependencies are pinned to the same version, including the @jsxImportSource pragma.
49</requirements>
50
148```val type=http
149/** Use this template when you create http vals only */
150/** @jsxImportSource https://esm.sh/react@18.2.0 */
151import React from "https://esm.sh/react@18.2.0";
152import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
153
154/**

trackESMContentmain.tsx2 matches

@maxm•Updated 3 months ago
3
4const URLS = [
5 "https://esm.sh/react-dom@18.2.0/client",
6 "https://esm.sh/react-dom@18.2.0/es2022/react-dom.mjs",
7];
8const KEY = (new URL(import.meta.url)).pathname.split("/").at(-1);

react_client_forkmain.tsx3 matches

@charmaine•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import { blob } from "https://esm.town/v/std/blob?v=10";
5

valTownInspoListmain.tsx19 matches

@charmaine•Updated 3 months ago
5 "val": "@rodrigotello.valTownInspoList",
6 image:
7 "https://air-prod.imgix.net/abff23bf-fc18-485f-a6b5-4a1c8b7f91ec.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
8}, {
9 "title": "NASA photo of the day.",
11 "val": "@rodrigotello.nasaAPOD",
12 "image":
13 "https://air-prod.imgix.net/11ab8b2e-c052-4574-8341-96d5d74040cc.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
14}, {
15 "title": "hnFollow",
17 "val": "@rodrigotello.hnFollow",
18 "image":
19 "https://air-prod.imgix.net/61e08fed-c77e-4a7b-9ae5-1efabb349574.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
20}, {
21 "title": "GitHub events",
23 "val": "@stevekrouse.githubEvents",
24 image:
25 "https://air-prod.imgix.net/3545d2cb-7cae-49d9-98b7-832428d2af34.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
26}, {
27 "title": "Twitter alerts",
29 "val": "@stevekrouse.twitterAlert",
30 image:
31 "https://air-prod.imgix.net/4c81af31-0832-4c72-8afb-34ef23fa03c9.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
32}, {
33 "title": "Air quality",
36 "val": "@stevekrouse.aqi",
37 image:
38 "https://air-prod.imgix.net/1a21321c-2bb7-4aa8-8c26-eb58cf1787a2.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
39}, {
40 "title": "Annoy friends in Bluesky",
42 "val": "@ajax.annoy",
43 image:
44 "https://air-prod.imgix.net/d21d3c1f-99e9-4356-85ed-bc6d7746c867.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
45}, {
46 "title": "Venue calendar",
48 "val": "@rlesser.Resy_getVenueCalendar",
49 image:
50 "https://air-prod.imgix.net/cab68838-bc60-48a2-8b00-50f203ac303d.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
51}, {
52 "title": "Bitcoin price alert",
54 "val": "@stevekrouse.btcPriceAlert",
55 image:
56 "https://air-prod.imgix.net/0d6605d2-b3ab-4bcb-9cf4-06580c5007ee.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
57}, {
58 "title": "RSS Notification",
60 "val": "@stevekrouse.pollRSSFeeds",
61 image:
62 "https://air-prod.imgix.net/9ad2b03e-ea41-4402-b18d-50df75f29d5e.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
63}, {
64 "title": "Uptime monitor",
66 "val": "@healeycodes.isMyWebsiteDown",
67 image:
68 "https://air-prod.imgix.net/c662747c-92cd-4e3a-ac91-1209f7cf6fb5.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
69}, {
70 "title": "Stale PRs",
72 "val": "@ramkarthik.staleGithubPRsEmail",
73 image:
74 "https://air-prod.imgix.net/640fc428-31a1-44b3-a9ac-4af8474fa867.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
75}, {
76 "title": "Wholefoods RSS",
78 "val": "@Glench.wholeFoodsRSS",
79 image:
80 "https://air-prod.imgix.net/2ab8f2e0-3146-4c92-a4de-f0e49ef9e456.jpg?w=600&h=2000&auto=compress&ixlib=react-9.5.4",
81}, {
82 "title": "Discord Welcome Bot",
85 "val": "@vtdocs.discordWelcomeBotCron",
86 image:
87 "https://air-prod.imgix.net/9286aea4-98c3-4c6e-aa45-537932a51dfb.jpg?w=600&h=2000&auto=compress&ixlib=react-9.5.4",
88}, {
89 "title": "Slack app",
91 "val": "@nate.slackapp",
92 image:
93 "https://air-prod.imgix.net/70698db9-7715-4092-bbc1-be51ad08ff28.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
94}, {
95 "title": "Spotify Discover Weekly Archive",
97 "val": "@stevekrouse.spotifyArchiveDiscoverWeekly",
98 image:
99 "https://air-prod.imgix.net/78470f14-26f3-4733-863b-b0c0572769f3.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
100}, {
101 "title": "Save HTML Form Data",
104 "val": "@vtdocs.renderFormAndSaveData",
105 image:
106 "https://air-prod.imgix.net/466437ed-3cf2-4305-8feb-b69413dc748e.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
107}, {
108 "title": "Daily Joke Bot",
116 "val": "@stevekrouse.handleDiscordNewUser",
117 image:
118 "https://air-prod.imgix.net/11aee64e-8d3d-4f13-9bb0-e1cef14bc74c.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
119}, {
120 "title": "Generate PDFs",
122 "val": "@vtdocs.examplePDF",
123 image:
124 "https://air-prod.imgix.net/719430b6-eb81-4bfa-8c21-ba834840fb92.jpg?w=1200&h=2000&auto=compress&ixlib=react-9.5.4",
125}, {
126 "title": "Current Stock Price",

vblogREADME.md1 match

@jxnblk•Updated 3 months ago
10
11The `www` val serves the site using the `src/hono-adapter`.
12This "adapter" could use any framework for rendering so that you could use something like React or something like Handlebars

OpenTownieindex3 matches

@shouser•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { ValTown } from "https://esm.sh/@valtown/sdk";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
5import { generateCodeAnthropic, makeFullPrompt } from "./backend/generateCode";
6

reactRouter7README.md3 matches

@justbe•Updated 3 months ago
1# React Router v7
2
3This project demonstrates how to use react-router v7's [custom framework setup](https://reactrouter.com/start/framework/custom) to run react-router in a val.town project.
4
5This is a direct port of [their example repo](https://github.com/remix-run/custom-react-router-framework-example).

reactRouter7about.tsx2 matches

@justbe•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3import { useLoaderData } from "https://esm.sh/react-router@7.1.3?deps=react@18.2.0,react-dom@18.2.0";
4import type loader from "./about.loader.js";
5

react-router-starter-remix-13 file matches

@jxnblk•Updated 1 day ago

reactHonoStarter4 file matches

@stfnsr•Updated 2 days ago