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=411&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 4184 results for "react"(492ms)

OpenTownieindex.tsx3 matches

@pomdtr•Updated 2 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 2 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/**

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

userEnrichmenthome.tsx1 match

@justbe•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3export default function Home() {

OpenTowniesystem_prompt.txt4 matches

@shouser•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/**

userEnrichmentserver.ts3 matches

@justbe•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
3import {
4 createStaticHandler,
5 createStaticRouter,
6 StaticRouterProvider,
7} from "https://esm.sh/react-router@7.1.3?deps=react@18.2.0,react-dom@18.2.0";
8
9import routes from "./routes/_index.ts";

userEnrichmentclient.tsx5 matches

@justbe•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3import { hydrateRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import { RouterProvider } from "https://esm.sh/react-router@7.1.3/dom?deps=react@18.2.0,react-dom@18.2.0";
5import { createBrowserRouter } from "https://esm.sh/react-router@7.1.3?deps=react@18.2.0,react-dom@18.2.0";
6import { StrictMode } from "https://esm.sh/react@18.2.0";
7import routes from "./routes/_index.ts";
8

reactHonoStarter4 file matches

@Nabinduthraj•Updated 10 hours ago

atProtoLexiconThing4 file matches

@wilhelm•Updated 22 hours ago
Starter template with client-side React & Hono server