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=52&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 4512 results for "react"(304ms)

OpenTownieLoadingSpinner.tsx2 matches

@jxnblk•Updated 1 week ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3
4export const LoadingSpinner = () => (

OpenTownieindex.tsx2 matches

@jxnblk•Updated 1 week ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?dev";
3import { App } from "./components/App.tsx";
4

OpenTownieImageUpload.tsx4 matches

@jxnblk•Updated 1 week ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useRef, useState } from "https://esm.sh/react@18.2.0?dev";
3
4// Maximum number of images that can be uploaded
15
16 // Handle file selection
17 const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {
18 if (e.target.files) {
19 processFiles(Array.from(e.target.files));
74
75 {/* Expose the file input ref for external access */}
76 {React.cloneElement(<></>, { fileInputRef })}
77 </div>
78 );

OpenTownieHome.tsx3 matches

@jxnblk•Updated 1 week ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3
4export function Home({ onLoginClick }: { onLoginClick: () => void }) {
123 </p>
124 <ul className="list-disc pl-5 space-y-1 text-gray-700 mb-4">
125 <li>React frontend with TypeScript</li>
126 <li>Hono API server backend</li>
127 <li>Tailwind CSS for styling</li>

OpenTownieErrorDisplay.tsx2 matches

@jxnblk•Updated 1 week ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3
4interface ErrorDisplayProps {

OpenTownieDirectoryTree.tsx4 matches

@jxnblk•Updated 1 week ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useEffect, useState } from "https://esm.sh/react@18.2.0?dev";
3
4// Type definitions
144 };
145
146 const handleCheckChange = (e: React.ChangeEvent<HTMLInputElement>) => {
147 onCheck(node.path, e.target.checked);
148 };
149
150 const handleNodeClick = (e: React.MouseEvent) => {
151 // Don't toggle checkbox if clicking on the expand/collapse arrow
152 if ((e.target as HTMLElement).classList.contains("toggle-expand")) {

OpenTownieCreateProject.tsx3 matches

@jxnblk•Updated 1 week ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useEffect, useState } from "https://esm.sh/react@18.2.0?dev";
3
4export function CreateProjectModal({
20 if (!isOpen) return null;
21
22 const handleSubmit = async (e: React.FormEvent) => {
23 e.preventDefault();
24

OpenTownieCreateBranch.tsx3 matches

@jxnblk•Updated 1 week ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useState } from "https://esm.sh/react@18.2.0?dev";
3
4interface CreateBranchProps {
25 };
26
27 const handleSubmit = async (e: React.FormEvent) => {
28 e.preventDefault();
29

OpenTownieChat.tsx7 matches

@jxnblk•Updated 1 week 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, { useState, useEffect } from "https://esm.sh/react@18.2.0?dev";
4import { useChatLogic } from "../hooks/useChatLogic.ts";
5import { useProjectFiles } from "../hooks/useProjectFiles.ts";
65
66 // Handle drag events for the entire page
67 const handleDragEnter = (e: React.DragEvent) => {
68 e.preventDefault();
69 e.stopPropagation();
71 };
72
73 const handleDragLeave = (e: React.DragEvent) => {
74 e.preventDefault();
75 e.stopPropagation();
84 };
85
86 const handleDragOver = (e: React.DragEvent) => {
87 e.preventDefault();
88 e.stopPropagation();
89 };
90
91 const handleDrop = (e: React.DragEvent) => {
92 e.preventDefault();
93 e.stopPropagation();

OpenTownieChatMessages.tsx2 matches

@jxnblk•Updated 1 week ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3import { MessageItem } from "./MessageItem.tsx";
4import { ErrorDisplay } from "./ErrorDisplay.tsx";

react-router-starter-remix-13 file matches

@jxnblk•Updated 2 days ago

reactHonoStarter4 file matches

@stfnsr•Updated 3 days ago