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/$%7Bsuccess?q=react&page=788&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 10034 results for "react"(2480ms)

windsurf_projectContextmain.tsx13 matches

@toowired•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";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5// API Documentation
43/**
44 * Main App component
45 * @returns {React.ReactElement}
46 */
47function App() {
118 * CurrentPhase component
119 * @param {{phase: string, onUpdate: Function}} props
120 * @returns {React.ReactElement}
121 */
122function CurrentPhase({ phase, onUpdate }) {
126 /**
127 * Handles form submission
128 * @param {React.FormEvent} e - The form event
129 */
130 const handleSubmit = (e) => {
158 * ActiveBlocks component
159 * @param {{blocks: string[], onUpdate: Function}} props
160 * @returns {React.ReactElement}
161 */
162function ActiveBlocks({ blocks = [], onUpdate }) {
166 /**
167 * Handles form submission
168 * @param {React.FormEvent} e - The form event
169 */
170 const handleSubmit = (e) => {
216 * TaskList component
217 * @param {{tasks: Task[], onUpdate: Function}} props
218 * @returns {React.ReactElement}
219 */
220function TaskList({ tasks = [], onUpdate }) {
226 /**
227 * Handles form submission
228 * @param {React.FormEvent} e - The form event
229 */
230 const handleSubmit = (e) => {
342 * StepList component
343 * @param {{steps: Step[], onUpdate: Function}} props
344 * @returns {React.ReactElement}
345 */
346function StepList({ steps = [], onUpdate }) {
352 /**
353 * Handles form submission
354 * @param {React.FormEvent} e - The form event
355 */
356 const handleSubmit = (e) => {
456 * ChangeList component
457 * @param {{changes: Change[]}} props
458 * @returns {React.ReactElement}
459 */
460function ChangeList({ changes = [] }) {

cerebras_codermain.tsx10 matches

@Chandu1998•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
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);
175 }
176
177 async function handleSubmit(e: React.FormEvent | string) {
178 if (typeof e !== "string") {
179 e.preventDefault();
674 </div>
675 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
676 <React.Fragment key={iframeKey}>
677 <iframe
678 srcDoc={code}
680 className="w-full grow"
681 />
682 </React.Fragment>
683 </div>
684 </div>

sedateTurquoiseMitemain.tsx10 matches

@nn6n•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
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);
175 }
176
177 async function handleSubmit(e: React.FormEvent | string) {
178 if (typeof e !== "string") {
179 e.preventDefault();
674 </div>
675 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
676 <React.Fragment key={iframeKey}>
677 <iframe
678 srcDoc={code}
680 className="w-full grow"
681 />
682 </React.Fragment>
683 </div>
684 </div>

cerebras_codermain.tsx10 matches

@facundopri•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
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);
175 }
176
177 async function handleSubmit(e: React.FormEvent | string) {
178 if (typeof e !== "string") {
179 e.preventDefault();
674 </div>
675 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
676 <React.Fragment key={iframeKey}>
677 <iframe
678 srcDoc={code}
680 className="w-full grow"
681 />
682 </React.Fragment>
683 </div>
684 </div>

yc_findermain.tsx5 matches

@reetkumarbind•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react */
2import { csvParse } from "https://esm.sh/d3-dsv@3.0.1";
3import React, { useEffect, useState } from "https://esm.sh/react";
4import { createRoot } from "https://esm.sh/react-dom/client";
5
6interface YCCompany {
81 }, []);
82
83 const handleFileUpload = (event: React.ChangeEvent<HTMLInputElement>) => {
84 const file = event.target.files?.[0];
85 if (file) {
96 };
97
98 const handleSubmit = (event: React.FormEvent) => {
99 event.preventDefault();
100 setIsLoading(true);

genuineSilverUrialmain.tsx3 matches

@wasifshaik773•Updated 3 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
5function GtaInfo() {

Windsurfprojectcontext13 matches

@toowired•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";
4
5// API Documentation
43/**
44 * Main App component
45 * @returns {React.ReactElement}
46 */
47function App() {
113 * CurrentPhase component
114 * @param {{phase: string, onUpdate: Function}} props
115 * @returns {React.ReactElement}
116 */
117function CurrentPhase({ phase, onUpdate }) {
121 /**
122 * Handles form submission
123 * @param {React.FormEvent} e - The form event
124 */
125 const handleSubmit = (e) => {
153 * ActiveBlocks component
154 * @param {{blocks: string[], onUpdate: Function}} props
155 * @returns {React.ReactElement}
156 */
157function ActiveBlocks({ blocks, onUpdate }) {
161 /**
162 * Handles form submission
163 * @param {React.FormEvent} e - The form event
164 */
165 const handleSubmit = (e) => {
211 * TaskList component
212 * @param {{tasks: Task[], onUpdate: Function}} props
213 * @returns {React.ReactElement}
214 */
215function TaskList({ tasks, onUpdate }) {
221 /**
222 * Handles form submission
223 * @param {React.FormEvent} e - The form event
224 */
225 const handleSubmit = (e) => {
339 * StepList component
340 * @param {{steps: Step[], onUpdate: Function}} props
341 * @returns {React.ReactElement}
342 */
343function StepList({ steps, onUpdate }) {
349 /**
350 * Handles form submission
351 * @param {React.FormEvent} e - The form event
352 */
353 const handleSubmit = (e) => {
453 * ChangeList component
454 * @param {{changes: Change[]}} props
455 * @returns {React.ReactElement}
456 */
457function ChangeList({ changes }) {

video_calling_appmain.tsx3 matches

@reetkumarbind•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect, useRef } from 'https://esm.sh/react@18.2.0';
3import { createRoot } from 'https://esm.sh/react-dom@18.2.0/client';
4import Peer from 'https://esm.sh/simple-peer@9.11.1';
5

tirelessLavenderOttermain.tsx2 matches

@Zhesic67•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) => {

trackESMContentmain.tsx2 matches

@shouser•Updated 3 months ago
3
4const URLS = [
5 "https://esm.sh/react-dom@18.2.0/client",
6 "https://esm.sh/react-dom@18.2.0/es2022/react-dom.mjs",
7];
8const KEY = (new URL(import.meta.url)).pathname.split("/").at(-1);

reactHonoStarter4 file matches

@niceandneat•Updated 42 mins ago

reactHonoStarter10 file matches

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