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=25&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 10246 results for "react"(1834ms)

TownieuseChatLogic.ts4 matches

@th3nolo•Updated 1 day ago
1import { useChat } from "@ai-sdk/react";
2import React, { useCallback, useMemo, useRef, useState } from "react";
3import { playBellSound } from "../utils/soundEffects.ts";
4
101 }, [stop, pendingMessageId, soundEnabled]);
102
103 React.useEffect(() => {
104 customStopRef.current = handleStop;
105 }, [handleStop]);
106
107 React.useEffect(() => {
108 (window as any).customStopRef = customStopRef;
109 }, []);

TownieuseBranches.tsx1 match

@th3nolo•Updated 1 day ago
1import { useState, useEffect } from "react";
2
3const ENDPOINT = "/api/project-branches";

TownieTODOs.md1 match

@th3nolo•Updated 1 day ago
1- [ ] Give it a tool to make an HTTP request to its own endpoint to test things!
2- [x] Get React Router working on the client & move off localstorage for storing page state
3- [ ] When it hits the max number of steps, detect that and give the user a button (or instructions on how) to get it to continue (neverstew mentioned this)
4- [x] Make it look good

Towniesystem_prompt.txt6 matches

@th3nolo•Updated 1 day ago
183- **Imports:** Use `https://esm.sh` for npm and Deno dependencies to ensure compatibility on server and browser
184- **Storage Strategy:** Only use backend storage if explicitly required; prefer simple static client-side sites
185- **React Configuration:** When using React libraries, pin versions with `?deps=react@18.2.0,react-dom@18.2.0` and start the file with `/** @jsxImportSource https://esm.sh/react@18.2.0 */`
186- Ensure all React dependencies and sub-dependencies are pinned to the same version
187- **Styling:** Default to using TailwindCSS via `<script src="https://cdn.twind.style" crossorigin></script>` unless otherwise specified
188
270 - Always run table creation before querying
271
2723. **React Configuration:**
273 - All React dependencies must be pinned to 18.2.0
274 - Always include `@jsxImportSource https://esm.sh/react@18.2.0` at the top of React files
275 - Rendering issues often come from mismatched React versions
276
2774. **File Handling:**

TownieREADME.md2 matches

@th3nolo•Updated 1 day ago
47
48OpenTownie is built with:
49- React frontend with TypeScript
50- React Router
51- Hono API server backend
52- Web Audio API for sound notifications

TownieProjectsRoute.tsx2 matches

@th3nolo•Updated 1 day ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { Link } from "react-router";
3import { useProjects } from "../hooks/useProjects.tsx";
4import { Loading } from "./Loading.tsx";

TowniePreview.tsx4 matches

@th3nolo•Updated 1 day ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useEffect, useRef, useState } from "react";
3import { RefreshIcon } from "./icons.tsx";
4
42 }, [messages, running, currentEndpoint, customPath]);
43
44 const handleEndpointChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
45 setSelectedEndpointIndex(Number(e.target.value));
46 };
47
48 const handlePathChange = (e: React.ChangeEvent<HTMLInputElement>) => {
49 setCustomPath(e.target.value);
50 };

TowniePreviewFrame.tsx2 matches

@th3nolo•Updated 1 day ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useEffect, useRef, useState } from "react";
3import { RefreshIcon } from "./icons.tsx";
4

TownieNotFoundRoute.tsx1 match

@th3nolo•Updated 1 day ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2
3export function NotFoundRoute () {

TownieNewProjectRoute.tsx3 matches

@th3nolo•Updated 1 day ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useState } from "react";
3import { useNavigate } from "react-router";
4import { useCreateProject } from "../hooks/useCreateProject.tsx";
5

StarterPackFeeds11 file matches

@moe•Updated 5 hours ago
Hono + React + Tailwind + Farcaster Mini App Starter Project

FullstackStarter30 file matches

@wolf•Updated 11 hours ago
Starter template with client-side React & Hono server
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