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=1129&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 11933 results for "react"(2831ms)

npmExplorermain.tsx4 matches

@all•Updated 9 months ago
2 * This val creates an enhanced NPM package explorer using the npm registry API.
3 * It displays a grid of npm packages with basic information, categories, and navigation.
4 * The approach uses React for the frontend and fetch for API calls.
5 * It includes a details view for each package, a link to the npm page, and category navigation.
6 * Icons are added for each category, and additional pill boxes are included for specific topics.
9 */
10
11/** @jsxImportSource https://esm.sh/react */
12import React, { useEffect, useState, useCallback } from "https://esm.sh/react";
13import { createRoot } from "https://esm.sh/react-dom/client";
14
15const ITEMS_PER_PAGE = 30;

allFontmain.tsx3 matches

@all•Updated 9 months ago
1/** @jsxImportSource https://esm.sh/react */
2import React, { useState } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5const popularCombos = [

test_migratedmain.tsx2 matches

@jxnblk•Updated 9 months ago
1/** @jsxImportSource npm:preact */
2import { render } from "npm:preact-render-to-string";
3
4export function it(name, fn) {

textStoragemain.tsx6 matches

@all•Updated 9 months ago
1/**
2 * This program creates a text storage and management application with a dynamic CSS theme switcher.
3 * It uses Val Town's SQLite for persistence and React for the UI.
4 * The app allows users to add, view, edit, and delete text entries with titles, tags, and categories.
5 * It includes a header with navigation, search bar, filters, a tabbed template page with 100 templates,
7 */
8
9/** @jsxImportSource https://esm.sh/react */
10import React, { useState, useEffect } from "https://esm.sh/react";
11import { createRoot } from "https://esm.sh/react-dom/client";
12
13interface TextEntry {
81 };
82
83 const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {
84 event.preventDefault();
85 const form = event.currentTarget;
111 };
112
113 const handleTemplateSubmit = async (event: React.FormEvent<HTMLFormElement>) => {
114 event.preventDefault();
115 const form = event.currentTarget;

memeGeneratormain.tsx4 matches

@stevekrouse•Updated 9 months ago
4 */
5
6/** @jsxImportSource https://esm.sh/react */
7import React, { useState, useRef, useEffect } from "https://esm.sh/react";
8import { createRoot } from "https://esm.sh/react-dom/client";
9
10interface MemeTemplate {
134 };
135
136 const handleSubmit = (e: React.FormEvent) => {
137 e.preventDefault();
138 generateMeme();

linkInBioTemplatemain.tsx2 matches

@shreyasmakes•Updated 9 months ago
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
3
4export default async function(req: Request) {

QRCodeScannermain.tsx3 matches

@curtcox•Updated 9 months ago
12 */
13
14/** @jsxImportSource https://esm.sh/react */
15import React, { useState, useEffect, useRef } from "https://esm.sh/react";
16import { createRoot } from "https://esm.sh/react-dom/client";
17import jsQR from "https://esm.sh/jsqr";
18

zod_demo_frontendmain.tsx5 matches

@stevekrouse•Updated 9 months ago
1/** @jsxImportSource https://esm.sh/react */
2import React, { useState } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
4import type { User } from "https://esm.town/v/stevekrouse/zod_demo_shared";
5
9 const [serverResponse, setServerResponse] = useState<string>("");
10
11 const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
12 const { name, value } = e.target;
13 setUser(prev => ({ ...prev, [name]: name === "age" ? parseInt(value) || 0 : value }));
14 };
15
16 const handleSubmit = async (e: React.FormEvent) => {
17 e.preventDefault();
18 setErrors({});

zod_demo_httpREADME.md1 match

@stevekrouse•Updated 9 months ago
2
3* @stevekrouse/zod_demo_http (this val)
4* @stevekrouse/zod_demo_frontend (client-side react component)
5* @stevekrouse/zod_demo_shared (code that is imported in both vals, but only run on the backend)
6

turnitdownmain.tsx1 match

@yawnxyz•Updated 9 months ago
1/**
2 * This val creates a simple web interface using Hono framework to convert HTML to Markdown.
3 * It uses HTMX for dynamic updates and Alpine.js for reactivity.
4 * The Turndown library is used for HTML to Markdown conversion.
5 * The interface includes two text areas (input and output) and buttons for conversion and copying.

reactHonoStarter4 file matches

@lightweight•Updated 2 hours ago

MiniAppStarter9 file matches

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