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=600&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 9670 results for "react"(1413ms)

replicate_starterApp.tsx7 matches

@charmaine•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 from "https://esm.sh/react@18.2.0";
4
5function ImageGenerator() {
6 const [prompt, setPrompt] = React.useState("");
7 const [images, setImages] = React.useState<any>([]);
8 const [loading, setLoading] = React.useState(false);
9
10 const samplePrompts = [
31 };
32
33 React.useEffect(() => {
34 // Set a random prompt when component mounts
35 setPrompt(getRandomPrompt());

replicate_starterApp.tsx7 matches

@zeke•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 from "https://esm.sh/react@18.2.0";
4
5function ImageGenerator() {
6 const [prompt, setPrompt] = React.useState("");
7 const [images, setImages] = React.useState<any>([]);
8 const [loading, setLoading] = React.useState(false);
9
10 const samplePrompts = [
31 };
32
33 React.useEffect(() => {
34 // Set a random prompt when component mounts
35 setPrompt(getRandomPrompt());

applemain.tsx3 matches

@secure283•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 AppleSupportPage() {

markdownBlogStarterLayout.tsx3 matches

@charmaine•Updated 2 months ago
1/** @jsxImportSource npm:react@18.2.0 */
2import type { ReactNode } from "npm:react@18.2.0";
3
4export function Layout({ children }: { children: ReactNode }) {
5 return (
6 <html lang="en">

unassumingMaroonEarthwormwebpage2 matches

@stevedylandev•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { html } from "https://esm.town/v/stevekrouse/html";
3import { renderToString } from "npm:react-dom@18.2.0/server";
4import getUrl from "./sdk";
5

karate_classesmain.tsx4 matches

@Dhruv1609•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { Hono } from "https://esm.sh/hono";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import {
5 BrowserRouter,
9 useNavigate,
10 useParams,
11} from "https://esm.sh/react-router-dom@6.11.2?deps=react@18.2.0";
12import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
13import { z } from "https://esm.sh/zod@3.21.4";
14import { lastlogin } from "https://esm.town/v/stevekrouse/lastlogin_safe";

splendidCrimsonScorpionmain.tsx5 matches

@hold•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 App() {
14 };
15
16 const handleRegister = (e: React.FormEvent) => {
17 e.preventDefault();
18 if (password !== confirmPassword) {
23 };
24
25 const handleLogin = (e: React.FormEvent) => {
26 e.preventDefault();
27 setIsLoggedIn(true);

virtuousJadeSlugmain.tsx3 matches

@hold•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 from "https://esm.sh/react@18.2.0";
4
5function App() {

PetconREADME.md1 match

@Zeeshanshaikh2•Updated 2 months ago
1import React, { useState } from "react";
2import { Card, CardContent } from "@/components/ui/card";
3import { Button } from "@/components/ui/button";

loveyoumain.tsx5 matches

@nipungoyal•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { motion } from "https://esm.sh/framer-motion@11.0.3?deps=react@18.2.0,react-dom@18.2.0";
3import ReactDOM from "https://esm.sh/react-dom@18.2.0";
4import React from "https://esm.sh/react@18.2.0";
5
6function App() {
152
153function client() {
154 ReactDOM.createRoot(document.getElementById("root")!).render(<App />);
155}
156if (typeof document !== "undefined") { client(); }

StarterPackFeeds10 file matches

@moe•Updated 19 mins ago
Hono + React + Tailwind + Farcaster Mini App Starter Project

reactHonoStarter4 file matches

@deboneil07•Updated 1 hour 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