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/$%7Bsuccess?q=react&page=101&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 10148 results for "react"(928ms)

stevensDemo.cursorrules9 matches

@simonf•Updated 1 week 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

@simonf•Updated 1 week 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;

untitled-1615App.js4 matches

@mmabrouk•Updated 1 week ago
1import React, { useCallback, useEffect, useMemo, useState } from "npm:react";
2// Assuming lucide-react and recharts are installed in your project
3// npm install lucide-react recharts
4import {
5 ArrowLeftRight,
17 Search,
18 XCircle,
19} from "npm:lucide-react";
20import { Bar, BarChart, CartesianGrid, Cell, Legend, ResponsiveContainer, Tooltip, XAxis, YAxis } from "npm:recharts";
21

OpenTownieuseUsageStats.ts1 match

@charmaine•Updated 1 week ago
1import { useEffect } from "https://esm.sh/react@18.2.0?dev";
2
3export function useUsageStats (messages: any[], usages: any[]) {

OpenTownieuseScrollToBottom.tsx1 match

@charmaine•Updated 1 week ago
1import { useEffect, useRef } from 'https://esm.sh/react@18.2.0?dev';
2
3

OpenTownieuseProject.tsx1 match

@charmaine•Updated 1 week ago
1import { useState, useEffect } from "https://esm.sh/react@18.2.0?dev";
2import { useAuth } from "./useAuth.tsx";
3

OpenTownieuseProjects.tsx1 match

@charmaine•Updated 1 week ago
1import { useState, useEffect } from "https://esm.sh/react@18.2.0?dev";
2import { useAuth } from "./useAuth.tsx";
3

OpenTownieuseLoadingFavicon.ts1 match

@charmaine•Updated 1 week ago
1import { useEffect } from "https://esm.sh/react@18.2.0?dev";
2
3function setLoadingFavicon() {

OpenTownieuseCreateProject.tsx1 match

@charmaine•Updated 1 week ago
1
2import { useState, useEffect } from "https://esm.sh/react@18.2.0?dev";
3import { useAuth } from "./useAuth.tsx";
4

OpenTownieuseCreateBranch.tsx1 match

@charmaine•Updated 1 week ago
1import { useState, useEffect } from "https://esm.sh/react@18.2.0?dev";
2import { useAuth } from "./useAuth.tsx";
3

FullstackStarter30 file matches

@wolf•Updated 28 mins ago
Starter template with client-side React & Hono server
hanabi

hanabi3 file matches

@jxnblk•Updated 1 hour ago
React Router for Hono in Val Town
effector
Write business logic with ease Meet the new standard for modern TypeScript development. Type-safe, reactive, framework-agnostic library to manage your business logic.
officialrajdeepsingh
Follow me if you learn more about JavaScript | TypeScript | React.js | Next.js | Linux | NixOS | Frontend Developer | https://linktr.ee/officialrajdeepsingh