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=345&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 4744 results for "react"(350ms)

OpenTownieMessageItem.tsx2 matches

@neverstew•Updated 4 weeks ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3import { MessagePart } from "./MessagePart.tsx";
4import { MessageTimer } from "./MessageTimer.tsx";

OpenTownieLogin.tsx2 matches

@neverstew•Updated 4 weeks 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";
3
4export function Login() {

OpenTownieLoadingSpinner.tsx2 matches

@neverstew•Updated 4 weeks 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

@neverstew•Updated 4 weeks 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

@neverstew•Updated 4 weeks 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 );

OpenTownieErrorDisplay.tsx2 matches

@neverstew•Updated 4 weeks 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

@neverstew•Updated 4 weeks 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")) {

OpenTownieCreateBranch.tsx3 matches

@neverstew•Updated 4 weeks 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

@neverstew•Updated 4 weeks 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";
64
65 // Handle drag events for the entire page
66 const handleDragEnter = (e: React.DragEvent) => {
67 e.preventDefault();
68 e.stopPropagation();
70 };
71
72 const handleDragLeave = (e: React.DragEvent) => {
73 e.preventDefault();
74 e.stopPropagation();
83 };
84
85 const handleDragOver = (e: React.DragEvent) => {
86 e.preventDefault();
87 e.stopPropagation();
88 };
89
90 const handleDrop = (e: React.DragEvent) => {
91 e.preventDefault();
92 e.stopPropagation();

OpenTownieChatMessages.tsx2 matches

@neverstew•Updated 4 weeks 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

react-router-starter3 file matches

@jxnblk•Updated 35 mins ago
Minimal React Router starter

reactHonoStarter4 file matches

@bradnoble•Updated 8 hours ago