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/image-url.jpg%20%22Image%20title%22?q=react&page=14&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 9284 results for "react"(1619ms)

OpenTownieuseCreateProject.tsx1 match

@charmaine•Updated 20 hours 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 20 hours ago
1import { useState, useEffect } from "https://esm.sh/react@18.2.0?dev";
2import { useAuth } from "./useAuth.tsx";
3

OpenTownieuseChatLogic.ts4 matches

@charmaine•Updated 20 hours ago
1import { useChat } from "https://esm.sh/@ai-sdk/react?dev&deps=react@18.2.0&react-dom@18.2.0";
2import React, { useCallback, useMemo, useRef, useState } from "https://esm.sh/react@18.2.0?dev";
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 }, []);

OpenTownieuseBranches.tsx1 match

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

OpenTownieuseAuth.tsx2 matches

@charmaine•Updated 20 hours ago
1import { useState } from "https://esm.sh/react@18.2.0?dev";
2import { useLocalStorage } from "https://esm.sh/react-use?dev&deps=react@18.2.0&react-dom@18.2.0";
3
4const TOKEN_KEY = "bearer";

OpenTowniesystem_prompt.txt6 matches

@charmaine•Updated 20 hours 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
269 - Always run table creation before querying
270
2713. **React Configuration:**
272 - All React dependencies must be pinned to 18.2.0
273 - Always include `@jsxImportSource https://esm.sh/react@18.2.0` at the top of React files
274 - Rendering issues often come from mismatched React versions
275
2764. **File Handling:**

OpenTownieRequireAuthRoute.tsx2 matches

@charmaine•Updated 20 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import {
3 Outlet,
4 Navigate,
5 useLocation,
6} from "https://esm.sh/react-router@7?dev&deps=react@18.2.0&react-dom@18.2.0";
7import { useAuth } from "../hooks/useAuth.tsx";
8

OpenTownieProjectsRoute.tsx2 matches

@charmaine•Updated 20 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { Link } from "https://esm.sh/react-router@7?dev&deps=react@18.2.0&react-dom@18.2.0";
3import { useProjects } from "../hooks/useProjects.tsx";
4import { Loading } from "./Loading.tsx";

OpenTowniePreview.tsx5 matches

@charmaine•Updated 20 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useLocalStorage } from "https://esm.sh/react-use?dev&deps=react@18.2.0&react-dom@18.2.0";
3import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0?dev";
4import { RefreshIcon } from "./icons.tsx";
5
39 }, [messages, running, currentEndpoint, customPath]);
40
41 const handleEndpointChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
42 setSelectedEndpointIndex(Number(e.target.value));
43 };
44
45 const handlePathChange = (e: React.ChangeEvent<HTMLInputElement>) => {
46 setCustomPath(e.target.value);
47 };

OpenTowniePreviewFrame.tsx2 matches

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

IClickWolf4 file matches

@vtTestLocal•Updated 20 hours ago
Starter template with client-side React & Hono server

vt-discord4 file matches

@boucher•Updated 5 days 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