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=771&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 9615 results for "react"(2273ms)

Goldcalculatormain.tsx4 matches

@Madhu3283•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0?deps=react@18.2.0,react-dom@18.2.0";
3import ReactDOM from "https://esm.sh/react-dom@18.2.0?deps=react@18.2.0,react-dom@18.2.0";
4
5// Custom Logo Component
219 const rootElement = document.getElementById("root");
220 if (rootElement) {
221 ReactDOM.createRoot(rootElement).render(<GoldSellCalculator />);
222 }
223}

rousingTurquoiseKrillmain.tsx2 matches

@Arvindrajput61201•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 **/
2import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
3
4export default (req: Request) => {

terrificIndigoAlbatrossmain.tsx10 matches

@stevekrouse•Updated 3 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?deps=react@18.2.0";
4import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter?deps=react@18.2.0,react-dom@18.2.0";
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
33}: {
34 prompt: string;
35 setPrompt: React.Dispatch<React.SetStateAction<string>>;
36 handleSubmit: (e: React.FormEvent) => void;
37 handleStarterPromptClick: (promptItem: PromptItem) => void;
38}) {
122
123function App() {
124 const previewRef = React.useRef<HTMLDivElement>(null);
125 const [prompt, setPrompt] = useState("");
126 const [projectId, setProjectId] = useState<number | null>(null);
180 }
181
182 async function handleSubmit(e: React.FormEvent | string) {
183 if (typeof e !== "string") {
184 e.preventDefault();
679 </div>
680 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
681 <React.Fragment key={iframeKey}>
682 <iframe
683 srcDoc={code}
685 className="w-full grow"
686 />
687 </React.Fragment>
688 </div>
689 </div>

sweetPeachEarthwormmain.tsx11 matches

@c0dergamer•Updated 3 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?deps=react@18.2.0";
4import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter?deps=react@18.2.0,react-dom@18.2.0";
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
32}: {
33 prompt: string;
34 setPrompt: React.Dispatch<React.SetStateAction<string>>;
35 handleSubmit: (e: React.FormEvent) => void;
36 handleStarterPromptClick: (promptItem: PromptItem) => void;
37 model: string;
38 setModel: React.Dispatch<React.SetStateAction<string>>;
39}) {
40 const inIframe = window.self !== window.top;
133
134function App() {
135 const previewRef = React.useRef<HTMLDivElement>(null);
136 const [prompt, setPrompt] = useState("");
137 const [projectId, setProjectId] = useState<number | null>(null);
192 }
193
194 async function handleSubmit(e: React.FormEvent | string) {
195 if (typeof e !== "string") {
196 e.preventDefault();
691 </div>
692 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
693 <React.Fragment key={iframeKey}>
694 <iframe
695 srcDoc={code}
697 className="w-full grow"
698 />
699 </React.Fragment>
700 </div>
701 </div>

mileiShowGraphmain.tsx4 matches

@stevekrouse•Updated 3 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, { useEffect, useState } from "https://esm.sh/react@18.2.0";
4import {
5 CartesianGrid,
11 XAxis,
12 YAxis,
13} from "https://esm.sh/recharts@2.7.2?deps=react@18.2.0";
14
15function App({ tweetData }) {

cerebras_codermain.tsx10 matches

@Devdezuk005g•Updated 3 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?deps=react@18.2.0";
4import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter?deps=react@18.2.0,react-dom@18.2.0";
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
33}: {
34 prompt: string;
35 setPrompt: React.Dispatch<React.SetStateAction<string>>;
36 handleSubmit: (e: React.FormEvent) => void;
37 handleStarterPromptClick: (promptItem: PromptItem) => void;
38}) {
122
123function App() {
124 const previewRef = React.useRef<HTMLDivElement>(null);
125 const [prompt, setPrompt] = useState("");
126 const [projectId, setProjectId] = useState<number | null>(null);
180 }
181
182 async function handleSubmit(e: React.FormEvent | string) {
183 if (typeof e !== "string") {
184 e.preventDefault();
679 </div>
680 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
681 <React.Fragment key={iframeKey}>
682 <iframe
683 srcDoc={code}
685 className="w-full grow"
686 />
687 </React.Fragment>
688 </div>
689 </div>

cerebras_codermain.tsx10 matches

@Mrboss•Updated 3 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?deps=react@18.2.0";
4import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter?deps=react@18.2.0,react-dom@18.2.0";
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
33}: {
34 prompt: string;
35 setPrompt: React.Dispatch<React.SetStateAction<string>>;
36 handleSubmit: (e: React.FormEvent) => void;
37 handleStarterPromptClick: (promptItem: PromptItem) => void;
38}) {
122
123function App() {
124 const previewRef = React.useRef<HTMLDivElement>(null);
125 const [prompt, setPrompt] = useState("");
126 const [projectId, setProjectId] = useState<number | null>(null);
180 }
181
182 async function handleSubmit(e: React.FormEvent | string) {
183 if (typeof e !== "string") {
184 e.preventDefault();
679 </div>
680 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
681 <React.Fragment key={iframeKey}>
682 <iframe
683 srcDoc={code}
685 className="w-full grow"
686 />
687 </React.Fragment>
688 </div>
689 </div>

TaskManagerAppmain.tsx4 matches

@arfan•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import {
3 AlertCircle,
11 Trash,
12 XCircle,
13} from "https://esm.sh/lucide-react?deps=react@18.2.0";
14import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0,react-dom@18.2.0";
15import React, { ChangeEvent, useCallback, useEffect, useState } from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
16
17/** Represents a task item in the task manager. */

billiardCafeAppmain.tsx10 matches

@Kpool•Updated 3 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, { useCallback, useEffect, useMemo, useRef, useState } from "https://esm.sh/react@18.2.0";
4
5function GameChallenge({ user, onGameEnd }) {
352 {
353 "imports": {
354 "react": "https://esm.sh/react@18.2.0",
355 "react-dom": "https://esm.sh/react-dom@18.2.0",
356 "react-dom/client": "https://esm.sh/react-dom@18.2.0/client"
357 }
358 }
366 <script src="https://esm.town/v/std/catch"></script>
367 <script type="module">
368 import React from 'react';
369 import { createRoot } from 'react-dom/client';
370
371 const App = () => {
372 const [username, setUsername] = React.useState('');
373 const [error, setError] = React.useState('');
374
375 const handleLogin = async (e) => {

lhcmain.tsx3 matches

@vawogbemi•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
3import React, { useState } from "https://esm.sh/react@18.2.0";
4import { email } from "https://esm.town/v/std/email";
5import { OpenAI } from "https://esm.town/v/std/openai";

StarterPackFeeds10 file matches

@moe•Updated 10 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