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=17&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 4213 results for "react"(454ms)

stevensDemoNotebookView.tsx5 matches

@swriddle•Updated 4 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, {
3 useState,
4 useEffect,
5 useCallback,
6 useMemo,
7} from "https://esm.sh/react@18.2.0";
8import { type Memory } from "../../shared/types.ts";
9
89 }, [fetchMemories]);
90
91 const handleAddMemory = async (e: React.FormEvent) => {
92 e.preventDefault();
93 if (!newMemoryText.trim()) return;
144 };
145
146 const handleUpdateMemory = async (e: React.FormEvent) => {
147 e.preventDefault();
148 if (!editingMemory || !editingMemory.text.trim()) return;

stevensDemoApp.tsx5 matches

@swriddle•Updated 4 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, {
3 useState,
4 useEffect,
5 useCallback,
6 useMemo,
7} from "https://esm.sh/react@18.2.0";
8import { type Memory } from "../../shared/types.ts";
9import { ASSETS, SCENE_POSITIONS, SOURCE_TYPES } from "./assets.ts";
165 }, [fetchMemories]);
166
167 const handleAddMemory = async (e: React.FormEvent) => {
168 e.preventDefault();
169 if (!newMemoryText.trim()) return;
220 };
221
222 const handleUpdateMemory = async (e: React.FormEvent) => {
223 e.preventDefault();
224 if (!editingMemory || !editingMemory.text.trim()) return;

stevensDemohandleTelegramMessage.ts1 match

@swriddle•Updated 4 days ago
155- Current health goals and any medication reminders needed?
156
157Your goal is to collect this information naturally through conversation and store it as memories (as undated memories). Once you've gathered sufficient background information, you can conclude the intake process and transition to normal reactive chat.
158
159If the conversation is already past the intake stage, then analyze the message content and think about which memories might be worth creating based on the information provided.

twitterCardstweetCard.tsx3 matches

@nbbaier•Updated 4 days ago
1/** @jsxImportSource https://esm.sh/react@19.1.0 */
2import { createRoot } from "https://esm.sh/react-dom@19.1.0/client";
3import React from "https://esm.sh/react@19.1.0";
4import css from "https://esm.town/v/nbbaier/twitterCards/tweetCardCSS.ts";
5import type {

FarcasterMiniAppStoreHome.tsx5 matches

@moe•Updated 4 days ago
1/** @jsxImportSource https://esm.sh/react@19 */
2import fcsdk from "https://esm.sh/@farcaster/frame-sdk";
3import { ArrowUpRight, CircleX, ExternalLink, LoaderCircle, Store } from "https://esm.sh/lucide-react";
4import { NavLink, Route, Routes, useNavigate, useParams, useSearchParams } from "https://esm.sh/react-router@7";
5import { useEffect, useMemo, useRef, useState } from "https://esm.sh/react@19";
6
7import { Button, Input, Section, ShareButton } from "../components/ui.tsx";
28 {context && <ShareButton onClick={onShare} />}
29 </div>
30 {/* <div class="opacity-50">Hono + React + Tailwind + Farcaster Mini App Starter Project on Val Town</div> */}
31
32 <MiniApps />
pie

piemain.tsx2 matches

@jxnblk•Updated 4 days ago
5 */
6
7/** @jsxImportSource https://esm.sh/preact */
8import chroma from "npm:chroma-js";
9import { render } from "npm:preact-render-to-string";
10
11const R = 128;
the-juice

the-juicetragic-indigo-gopher4 matches

@jxnblk•Updated 4 days ago
2 * This is a super juicy "Hello World" val for Val Town.
3 * It creates an interactive, animated HTML page with a greeting message.
4 * The page includes a client-side React component with juicy interactions.
5 */
6/** @jsxImportSource https://esm.sh/react */
7import React, { useState, useEffect } from "https://esm.sh/react";
8import { createRoot } from "https://esm.sh/react-dom/client";
9
10/**
the-juice

the-juicestill-olive-barnacle4 matches

@jxnblk•Updated 4 days ago
2 * This program implements a simple Wave Function Collapse algorithm to generate
3 * a random game world rendered in ASCII characters with different colors.
4 * It uses React for the client-side rendering and handles the generation
5 * on the server-side.
6 */
7
8/** @jsxImportSource https://esm.sh/react */
9import React, { useState, useEffect } from "https://esm.sh/react";
10import { createRoot } from "https://esm.sh/react-dom/client";
11
12// Define tile types and their constraints
the-juice

the-juicejuicy-number-20493 matches

@jxnblk•Updated 4 days ago
1/** @jsxImportSource https://esm.sh/react */
2import React from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5function App() {
the-juice

the-juiceholy-black-bedbug3 matches

@jxnblk•Updated 4 days ago
1/** @jsxImportSource https://esm.sh/react */
2import confetti from 'https://esm.sh/canvas-confetti@1.6.0';
3import React from "https://esm.sh/react";
4import { renderToString } from "https://esm.sh/react-dom/server";
5
6const css = `

reactHonoStarter4 file matches

@stfnsr•Updated 1 day ago

myNewWebsite4 file matches

@billogiovanni•Updated 1 day ago
Starter template with client-side React & Hono server