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/image-url.jpg%20%22Image%20title%22?q=react&page=872&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 9340 results for "react"(2226ms)

RefiComparisonmain.tsx6 matches

@jbwinters•Updated 8 months ago
2 * This app creates a comprehensive mortgage refinance offer comparison tool.
3 * It calculates monthly payments, total interest paid, and displays charts for visual comparison.
4 * It uses React for the frontend, Chart.js for data visualization, and Val Town's blob storage for data persistence.
5 */
6
7/** @jsxImportSource https://esm.sh/react */
8import React, { useState, useEffect, useRef } from "https://esm.sh/react";
9import { createRoot } from "https://esm.sh/react-dom/client";
10import Chart from "https://esm.sh/chart.js/auto";
11
71 };
72
73 const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
74 const { name, value } = e.target;
75 setNewOffer((prev) => ({ ...prev, [name]: name === "lender" ? value : Number(value) }));
86 };
87
88 const handleSubmit = async (e: React.FormEvent) => {
89 e.preventDefault();
90 const monthlyPayment = calculateMonthlyPayment(loanAmount, newOffer.rate, newOffer.term);

smsjournalerregistrationmain.tsx4 matches

@cephalization•Updated 8 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 relayURL = "https://cephalization-smsjournalertextrelay.web.val.run";
10 const [message, setMessage] = useState("");
11
12 const handleSubmit = async (e: React.FormEvent) => {
13 e.preventDefault();
14 try {

npmExplorermain.tsx4 matches

@all•Updated 8 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 8 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 8 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 8 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 8 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 8 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 8 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 8 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({});

IClickWolf4 file matches

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

vt-discord4 file matches

@boucher•Updated 6 days ago
Starter template with client-side React & Hono server
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