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=666&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 8584 results for "react"(1436ms)

vividCopperWrenmain.tsx10 matches

@vishu44•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>

reverentAquaCuckoomain.tsx10 matches

@vishu44•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>

exuberantLimeReindeermain.tsx10 matches

@gunisettigokul•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

@gunisettigokul•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>

rm_ios_testmain.tsx9 matches

@arfan•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, useRef, useState } from "https://esm.sh/react@18.2.0";
4
5/* ------------------------------ CSS Styles ------------------------------ */
327}
328
329/* --------------------- React Types & Components --------------------- */
330
331// [ADDED] Add `link` to the App interface
339
340/**
341 * React component that shows an individual app icon & title.
342 */
343function AppCard({ app, onEdit }: { app: App; onEdit: (app: App) => void }) {
348
349 // Right-click => open edit overlay
350 const handleRightClick = (e: React.MouseEvent) => {
351 e.preventDefault();
352 onEdit(app);
556
557/**
558 * Main React component that displays the header, categories, apps, & state.
559 */
560function App() {
646
647 // Import
648 const handleImportApps = async (e: React.ChangeEvent<HTMLInputElement>) => {
649 if (!e.target.files || e.target.files.length === 0) return;
650 const file = e.target.files[0];
777
778/**
779 * Client entry-point to render the React App.
780 */
781function client() {

kanbanTodoListmain.tsx4 matches

@stevekrouse•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import {
3 DragDropContext,
4 Draggable,
5 Droppable,
6} from "https://esm.sh/react-beautiful-dnd@13.1.1?deps=react@18.2.0,react-dom@18.2.0";
7import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
8import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
9
10function TaskBoard() {

cerebras_codermain.tsx5 matches

@Danap•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
66 const [isEditMode, setIsEditMode] = useState(false);
67
68 const handleSubmit = async (e: React.FormEvent) => {
69 e.preventDefault();
70 setIsLoading(true);

nobleJadeRoadrunnermain.tsx2 matches

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

preciseScarletHerringmain.tsx3 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, { useState } from "https://esm.sh/react@18.2.0";
4
5function App() {

cerebrasTemplatemain.tsx3 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, { useState } from "https://esm.sh/react@18.2.0";
4
5function App() {

vt-discord4 file matches

@boucher•Updated 1 day ago
Starter template with client-side React & Hono server

diceRollerUI1 file match

@dcm31•Updated 1 day ago
A web-based dice roller using React on Val Town
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