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/$%7Bart_info.art.src%7D?q=react&page=1058&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 11838 results for "react"(2162ms)

cerebras_codermain.tsx10 matches

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

cerebras_codermain.tsx10 matches

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

neatBlackSwiftmain.tsx10 matches

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

summarizeHnmain.tsx6 matches

@prashamtrivedi•Updated 5 months ago
1/** @jsxImportSource https://esm.sh/react */
2import React, { useState, useEffect } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
4import { GoogleGenerativeAI } from "https://esm.sh/@google/generative-ai";
5
221 if (root) {
222 try {
223 console.log("Rendering React app");
224 createRoot(root).render(<App />);
225 console.log("React app rendered");
226 } catch (error) {
227 console.error("Error rendering React app:", error);
228 root.innerHTML = `<div class="error">Error rendering the application. Please check the console for more details.</div>`;
229 }

cerebras_codermain.tsx10 matches

@the_samoudi•Updated 5 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import Cerebras from "https://esm.sh/@cerebras/cerebras_cloud_sdk";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter";
5import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
6import { STARTER_PROMPTS } from "https://esm.town/v/the_samoudi/cerebras_coder_prompts";
7
18}: {
19 prompt: string;
20 setPrompt: React.Dispatch<React.SetStateAction<string>>;
21 handleSubmit: (e: React.FormEvent) => void;
22 handleStarterPromptClick: (promptItem: PromptItem) => void;
23}) {
121
122function App() {
123 const previewRef = React.useRef<HTMLDivElement>(null);
124 const [prompt, setPrompt] = useState("");
125 const [projectId, setProjectId] = useState<number | null>(null);
178 }
179
180 async function handleSubmit(e: React.FormEvent | string) {
181 if (typeof e !== "string") {
182 e.preventDefault();
695 </div>
696 <div className="w-full h-full flex flex-col grow rounded-xl border-2 border-white">
697 <React.Fragment key={iframeKey}>
698 <iframe
699 srcDoc={code}
701 className="w-full h-full grow"
702 />
703 </React.Fragment>
704 </div>
705 </div>

hardworkingLimeCheetahmain.tsx10 matches

@stevekrouse•Updated 5 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import Cerebras from "https://esm.sh/@cerebras/cerebras_cloud_sdk";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter";
5import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
6 import { STARTER_PROMPTS } from "https://esm.town/v/stevekrouse/cerebras_coder_prompts";
7
19}: {
20 prompt: string;
21 setPrompt: React.Dispatch<React.SetStateAction<string>>;
22 handleSubmit: (e: React.FormEvent) => void;
23 handleStarterPromptClick: (promptItem: PromptItem) => void;
24}) {
122
123function App() {
124 const previewRef = React.useRef<HTMLDivElement>(null);
125 const [prompt, setPrompt] = useState("");
126 const [projectId, setProjectId] = useState<number | null>(null);
179 }
180
181 async function handleSubmit(e: React.FormEvent | string) {
182 if (typeof e !== "string") {
183 e.preventDefault();
696 </div>
697 <div className="w-full h-full flex flex-col grow rounded-xl border-2 border-white">
698 <React.Fragment key={iframeKey}>
699 <iframe
700 srcDoc={code}
702 className="w-full h-full grow"
703 />
704 </React.Fragment>
705 </div>
706 </div>

calmRoseCaterpillarmain.tsx4 matches

@hameed•Updated 5 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import mermaid from "https://esm.sh/mermaid@10.6.1";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
5
6// Spinner Component
58 }, [mermaidDiagram]);
59
60 const handleSubmit = async (e: React.FormEvent) => {
61 e.preventDefault();
62 setError("");

postMessageButtonGamemain.tsx3 matches

@edenh•Updated 5 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function App() {

blob_adminmain.tsx5 matches

@stevekrouse1•Updated 5 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { Hono } from "https://esm.sh/hono";
3import { debounce } from "https://esm.sh/lodash-es";
4import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
5import { useDropzone } from "https://esm.sh/react-dropzone?deps=react@18.2.0,react-dom@18.2.0";
6import React, { ReactNode, useCallback, useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
7import { lastlogin } from "https://esm.town/v/stevekrouse/lastlogin_safe";
8import { LoginWithGoogleButton } from "https://esm.town/v/stevekrouse/LoginWithGoogleButton";
9
10interface TooltipProps {
11 children: ReactNode;
12 content: string;
13}

blob_adminREADME.md1 match

@stevekrouse1•Updated 5 months ago
6
7Versions 0-17 of this val were done with Hono and server-rendering.
8Versions 18+ were generated with Townie and use client-side React.
9
10To use this val, fork it to your account.

MiniAppStarter9 file matches

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

reactHonoStarter4 file matches

@jessicagarson•Updated 1 day 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