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=596&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 9663 results for "react"(1741ms)

cerebras_coderindex10 matches

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

libsqlstudio_scriptmain.tsx7 matches

@AIWB•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createClient, ResultSet } from "@libsql/client/web";
3import React, { useMemo } from "https://esm.sh/react@18.2.0";
4
5function App({ Studio, ValtownDriver }) {
28 { Studio },
29 { default: ValtownDriver },
30 React,
31 ] = await Promise.all([
32 import("https://esm.sh/react-dom@18.2.0/client"),
33 import("https://esm.sh/@libsqlstudio/gui?deps=react@18.2.0,react-dom@18.2.0"),
34 import("https://esm.town/v/pomdtr/libsqlstudio_driver"),
35 import("https://esm.sh/react@18.2.0"),
36 ]);
37
38 const root = createRoot(document.getElementById("root"));
39 root.render(React.createElement(App, { Studio, ValtownDriver }));
40}
41

zakatCalculatormain.tsx3 matches

@Mujib786•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
5function ZakatCalculator() {

mellowOrangeLobstermain.tsx3 matches

@kemkem•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
5function App() {

cerebras_coderindex10 matches

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

valentinemain.tsx3 matches

@kemkem•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 = [

genuineBrownBoobymain.tsx4 matches

@sdevanair•Updated 2 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 ReactDOM from "https://esm.sh/react-dom@18.2.0/client";
4
5// Utility Functions
291 const rootElement = document.getElementById("root");
292 if (rootElement) {
293 ReactDOM.createRoot(rootElement).render(React.createElement(HabitTracker));
294 } else {
295 console.error("Root element not found");

habitTrackerAppmain.tsx4 matches

@sdevanair•Updated 2 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 ReactDOM from "https://esm.sh/react-dom@18.2.0/client";
4
5// Utility Functions
291 const rootElement = document.getElementById("root");
292 if (rootElement) {
293 ReactDOM.createRoot(rootElement).render(React.createElement(HabitTracker));
294 } else {
295 console.error("Root element not found");

forkyApp.tsx2 matches

@shouser•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useState } from "https://esm.sh/react@18.2.0";
3
4export function App() {

CatVisionmain.tsx4 matches

@recklessreticence•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { Camera } from "https://esm.sh/lucide-react@0.263.1";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
5
6function App() {

new_website

@wolf•Updated 2 hours ago
Starter template with client-side React & Hono server

StarterPackFeeds10 file matches

@moe•Updated 19 hours ago
Hono + React + Tailwind + Farcaster Mini App Starter Project
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