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=20&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 4227 results for "react"(407ms)

stevensDemopopulateDemo.ts1 match

@satcarโ€ขUpdated 4 days ago
274 createMemory(
275 "2025-04-13",
276 "Lucas allergic to peanuts - mild reaction only, not anaphylactic.",
277 "telegram",
278 "telegram",

stevensDemoNotebookView.tsx5 matches

@satcarโ€ข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;

stevensDemoindex.tsx2 matches

@satcarโ€ขUpdated 4 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import { App } from "./components/App.tsx";
4

stevensDemoindex.ts1 match

@satcarโ€ขUpdated 4 days ago
1/**
2 * @jsxImportSource https://esm.sh/react@18.2.0
3 */
4import { blob } from "https://esm.town/v/std/blob";

stevensDemohandleTelegramMessage.ts1 match

@satcarโ€ข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.

stevensDemo.cursorrules9 matches

@satcarโ€ขUpdated 4 days ago
199- **Storage Strategy:** Only use backend storage if explicitly required; prefer simple static client-side sites
200- For persistence, use Val Town SQLite or Blob storage with `import.meta.url` for keys/table names
201- **React Configuration:** When using React libraries, pin versions with `?deps=react@18.2.0,react-dom@18.2.0` and include the `@jsxImportSource` pragma
202- When facing client-side render issues, check if all React dependencies are pinned to the same version
203- **Styling:** Default to using TailwindCSS via `<script src="https://cdn.twind.style" crossorigin></script>` unless otherwise specified
204
262
263### Frontend Best Practices
264- Structure as a standard client-side React app
265- Use SVG for favicons (Val Town only supports text files)
266- Separate components into individual files
267- Access bootstrapped data from `window.__INITIAL_DATA__`
268- Use React 18.2.0 consistently in all imports and the `@jsxImportSource` pragma
269- Follow the React component pattern from the example project
270- Handle API calls properly with proper error catching
271
289 - Always run table creation before querying
290
2913. **React Configuration:**
292 - All React dependencies must be pinned to 18.2.0
293 - Always include `@jsxImportSource https://esm.sh/react@18.2.0` at the top of React files
294 - Rendering issues often come from mismatched React versions
295
2964. **File Handling:**

stevensDemoApp.tsx5 matches

@satcarโ€ข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;

EmailAttachmentLogApp.tsx4 matches

@wolfโ€ขUpdated 4 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useEffect, useState, useRef } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import copy from "https://esm.sh/copy-to-clipboard@3.3.3";
5
14}
15
16const App: React.FC = () => {
17 const [attachments, setAttachments] = useState<Attachment[]>([]);
18 const [loading, setLoading] = useState(true);

EmailAttachmentLogREADME.md3 matches

@wolfโ€ขUpdated 4 days ago
9โ”‚ โ””โ”€โ”€ index.ts # Minimal Hono app
10โ”œโ”€โ”€ frontend/
11โ”‚ โ”œโ”€โ”€ App.tsx # React component
12โ”‚ โ””โ”€โ”€ index.html # Minimal HTML shell
13โ”œโ”€โ”€ shared/
22- Receives emails with attachments
23- Stores attachments in blob storage
24- Displays attachments in a minimal React UI
25- Allows viewing and downloading attachments
26
27## Tech
28
29- React 18
30- Hono
31- Tailwind CSS

EmailAttachmentLogApp.tsx3 matches

@wolfโ€ขUpdated 4 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5interface Attachment {

react-router-starter-remix-13 file matches

@jxnblkโ€ขUpdated 1 hour ago

reactHonoStarter4 file matches

@stfnsrโ€ขUpdated 1 day ago