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/$%7Burl%7D?q=react&page=1216&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 12946 results for "react"(1237ms)

design32x32bitmapmain.tsx10 matches

@chekos•Updated 8 months ago
1/** @jsxImportSource https://esm.sh/react */
2import React, { useCallback, useEffect, useRef, useState } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
4import { adjectives, animals, colors, Config, uniqueNamesGenerator } from "https://esm.sh/unique-names-generator";
5
231 }, [settings.defaultName]);
232
233 const getPixelIndex = useCallback((event: React.MouseEvent | React.TouchEvent) => {
234 const canvas = event.currentTarget as HTMLDivElement;
235 const rect = canvas.getBoundingClientRect();
260 }, [size, brushSize]);
261
262 const handleStart = useCallback((event: React.MouseEvent | React.TouchEvent) => {
263 event.preventDefault();
264 const { index, x, y } = getPixelIndex(event);
271 }, [getPixelIndex, pixels, size]);
272
273 const handleMove = useCallback((event: React.MouseEvent | React.TouchEvent) => {
274 event.preventDefault();
275 if (isDrawing && startPositionRef.current) {
286 }, [isDrawing, getPixelIndex, setPixel, isPainting]);
287
288 const handleEnd = useCallback((event: React.MouseEvent | React.TouchEvent) => {
289 if (isDrawing && startPositionRef.current) {
290 const { index } = getPixelIndex(event);
386 "--border-color": colorScheme.border,
387 "--shadow-color": colorScheme.shadow,
388 } as React.CSSProperties}
389 >
390 <div className="retro-border">
435 const root = createRoot(document.getElementById("root"));
436 root.render(
437 <React.StrictMode>
438 <App />
439 </React.StrictMode>,
440 );
441 } catch (error) {

calculateTransitTimeValmain.tsx3 matches

@rochambeau314•Updated 8 months ago
4// Results are saved and displayed for each new address added, with options to delete individual results.
5
6/** @jsxImportSource https://esm.sh/react */
7import React, { useEffect, useState } from "https://esm.sh/react";
8import { createRoot } from "https://esm.sh/react-dom/client";
9
10function App() {

WobbleShapesmain.tsx3 matches

@yawnxyz•Updated 8 months ago
1/** @jsxImportSource https://esm.sh/react */
2import React, { useState, useRef, useEffect } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5function PotteryPlate({ radius, color, wobbliness, wobbleFrequency, wobbleIrregularity, rotation }) {

passwordGenmain.tsx3 matches

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

routineTrackerAppREADME.md1 match

@ashryanio•Updated 8 months ago
1# Routine Tracker
2
3This is a little React component to make our 7yo's after school routine self-serve so she can be a bit more independent after school.
4
5To change the items in the list, modify the `routineTasks` array of objects:

Splinemain.tsx4 matches

@muhammad_owais_warsi•Updated 8 months ago
1/** @jsxImportSource https://esm.sh/react */
2import React, { useEffect, useState } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5function App() {
10 useEffect(() => {
11 // Load the Spline component dynamically
12 import("https://esm.sh/@splinetool/react-spline@2.2.6")
13 .then((module) => {
14 setSplineComponent(() => module.default);

linkInBioTemplatemain.tsx2 matches

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

numbergamemain.tsx4 matches

@moe•Updated 8 months ago
1/** @jsxImportSource https://esm.sh/react */
2import React, { useEffect, useRef, useState } from "https://esm.sh/react"
3import { createRoot } from "https://esm.sh/react-dom/client"
4
5// Game board size
45 }
46
47 const handleTouchMove = (e: React.TouchEvent) => {
48 if (!isDragging || !boardRef.current) return
49

recordWebsitePreparermain.tsx3 matches

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

InventionDetailstoJSONConvertermain.tsx3 matches

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

reactHonoStarter4 file matches

@notmart•Updated 2 hours ago

FarcasterGallery10 file matches

@moe•Updated 11 hours ago
Hono + React + Tailwind + Farcaster Frame 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