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=585&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 9583 results for "react"(1376ms)

cerebras_coderindex10 matches

@Armanitown•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0";
3import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter?deps=react@18.2.0,react-dom@18.2.0";
4import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
5import STARTER_PROMPTS from "./starter-prompts.js";
6
30}: {
31 prompt: string;
32 setPrompt: React.Dispatch<React.SetStateAction<string>>;
33 handleSubmit: (e: React.FormEvent) => void;
34 handleStarterPromptClick: (promptItem: PromptItem) => void;
35}) {
116
117function App() {
118 const previewRef = React.useRef<HTMLDivElement>(null);
119 const [prompt, setPrompt] = useState("");
120 const [projectId, setProjectId] = useState<number | null>(null);
174 }
175
176 async function handleSubmit(e: React.FormEvent | string) {
177 if (typeof e !== "string") {
178 e.preventDefault();
673 </div>
674 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
675 <React.Fragment key={iframeKey}>
676 <iframe
677 srcDoc={code}
679 className="w-full grow"
680 />
681 </React.Fragment>
682 </div>
683 </div>

stevekrouse_dot_comproposal.tsx2 matches

@aginfer08•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { renderToString } from "npm:react-dom@18.2.0/server";
3import { Link } from "../helpers.tsx";
4

stevekrouse_dot_comindex.tsx2 matches

@aginfer08•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
3import { email } from "https://esm.town/v/std/email?v=11";
4import { Homepage } from "./homepage.tsx";

stevekrouse_dot_comhomepage.tsx2 matches

@aginfer08•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { renderToString } from "npm:react-dom@18.2.0/server";
3import { getHits } from "./analytics.ts";
4import { Link } from "./helpers.tsx";

stevekrouse_dot_comhelpers.tsx2 matches

@aginfer08•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3const linkClass = "text-blue-500 hover:underline";
4export const Link = (
5 { children, href }: {
6 children?: React.ReactNode;
7 href: string;
8 },

wholeTurquoiseCephalopodmain.tsx3 matches

@Samishah_999•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5interface MatchDetails {

reactHonoExampleApp.tsx3 matches

@stevekrouse•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import { type Message, MESSAGE_LIMIT } from "../../shared/utils.ts";
4import { MessageInput } from "./MessageInput.tsx";
7 { initialMessages = [], thisProjectURL }: { initialMessages?: Message[]; thisProjectURL?: string },
8) {
9 const [messages, setMessages] = React.useState(initialMessages);
10
11 const fetchMessages = async () => {

smtpmain.tsx4 matches

@smsohag•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5const STORAGE_KEY = 'smtp-config-v5';
58 };
59
60 const handleChange = (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>) => {
61 const { name, value } = e.target;
62 const updatedConfig = { ...config, [name]: value };

khandezzmain.tsx3 matches

@louisxvaldez•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useState } from "https://esm.sh/react@18.2.0";
4
5const NO_PHRASES = [

filemain.tsx3 matches

@jaballadares•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/preact */
2import { type ClassValue, clsx } from "https://esm.sh/clsx";
3import { Peer } from "https://esm.sh/peerjs@1.5.4?bundle-deps";
4import { render } from "https://esm.sh/preact";
5import { useEffect, useRef, useState } from "https://esm.sh/preact/hooks";
6
7interface NDEFRecord {

StarterPackFeeds10 file matches

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

reactHonoStarter4 file matches

@texoport•Updated 2 days 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