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/$1?q=react&page=16&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 15390 results for "react"(3140ms)

TownieProjectsRoute.tsx2 matches

@nelo•Updated 9 hours 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";

TowniePreviewFrame.tsx2 matches

@nelo•Updated 9 hours 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

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

TownieNewProjectRoute.tsx3 matches

@nelo•Updated 9 hours 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

TownieMessageTimer.tsx2 matches

@nelo•Updated 9 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useEffect, useState } from "react";
3
4const formatTime = (ms: number): string => {

TownieMessages.tsx7 matches

@nelo•Updated 9 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useState, createContext, useContext } from "react";
3import ReactMarkdown from "react-markdown";
4
5import { Loading } from "./Loading.tsx";
124function TextPart ({ part }) {
125 return (
126 <ReactMarkdown>
127 {part.text}
128 </ReactMarkdown>
129 );
130}
349 {message.parts.map((part, i) => part.type === "text" ? (
350 <div key={i} className="user-message">
351 <ReactMarkdown>
352 {part.text}
353 </ReactMarkdown>
354 </div>
355 ) : (

Townielogin.tsx2 matches

@nelo•Updated 9 hours ago
1/** @jsxImportSource npm:react@18.2.0 */
2import { Hono } from "npm:hono";
3import { renderToString } from "npm:react-dom@18.2.0/server";
4import { Footer, SOURCE_URL } from "../components/Footer.tsx";
5import { TownieIcon } from "../components/icons.tsx";

TownieLoading.tsx1 match

@nelo•Updated 9 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2
3export function Loading () {

TownieLayoutRoute.tsx2 matches

@nelo•Updated 9 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { Outlet } from "react-router";
3import { Header } from "./Header.tsx";
4

TownieInputBox.tsx8 matches

@nelo•Updated 9 hours ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useRef, useState, useEffect } from "react";
3import { PlusIcon, ArrowUpIcon, Square, XIcon } from "./icons.tsx";
4import { processFiles } from "../utils/images.ts";
15} : {
16 value: string;
17 onChange: (e: React.KeyboardEvent<HTMLInputElement>) => void;
18 onSubmit: (event: any) => void;
19 onCancel: () => void;
97 setImages: (images: (string|null)[]) => void;
98 running: boolean;
99 children: React.ReactNode;
100}) {
101 const dragging = useImageDrop({ images, setImages, running });
122 const [dragging, setDragging] = useState<boolean>(false);
123
124 const onDragEnter = (e: React.DragEvent) => {
125 e.preventDefault();
126 if (!e.dataTransfer?.types.includes('Files')) return;
128 }
129
130 const onDragLeave = (e:React.DragEvent) => {
131 e.preventDefault();
132 if (!e.relatedTarget) {
135 }
136
137 const onDragOver = (e:React.DragEvent) => {
138 e.preventDefault();
139 }
140
141 const onDrop = (e:React.DragEvent) => {
142 e.preventDefault();
143 setDragging(false);

reactHonoStarter4 file matches

@archie•Updated 18 hours ago

reactHonoStarter4 file matches

@ETLS•Updated 18 hours ago
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