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/$%7Bart_info.art.src%7D?q=react&page=830&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 9061 results for "react"(2968ms)

laserCutterSimulatormain.tsx3 matches

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

v2FanFicScrapermain.tsx4 matches

@willthereader•Updated 7 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// last stable version is 47
5function App() {
105
106function client() {
107 console.log("Initializing client-side React application");
108 createRoot(document.getElementById("root")).render(<App />);
109}

count_visitsmain.tsx5 matches

@muhammad_owais_warsi•Updated 7 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() {
52 {embedCode && (
53 <div className="result">
54 <h2>Embed Code (Copy and paste this into your React component):</h2>
55 <textarea readOnly value={embedCode} />
56 <p>Current Visitor Count: {visitorCount}</p>
90 const encodedUrl = encodeURIComponent(websiteUrl);
91 const embedCode = `
92import { useState, useEffect } from 'react';
93
94function VisitorCounter() {

zottifymain.tsx2 matches

@rapfl•Updated 7 months ago
1/** @jsxImportSource https://esm.sh/preact */
2import { encode } from "https://deno.land/std@0.107.0/encoding/base64.ts";
3import { render } from "npm:preact-render-to-string";
4import Replicate from "npm:replicate";
5

whoIsHiringmain.tsx4 matches

@stevekrouse•Updated 7 months ago
1/** @jsxImportSource https://esm.sh/react */
2
3import React, { useCallback, useEffect, useReducer, useRef, useState } from "https://esm.sh/react";
4import { hydrateRoot } from "https://esm.sh/react-dom/client";
5import { renderToString } from "https://esm.sh/react-dom/server";
6import { hnSearch } from "https://esm.town/v/stevekrouse/hnSearch";
7import About from "https://esm.town/v/vawogbemi/whoIsHiringAbout";

whoIsHiringREADME.md1 match

@stevekrouse•Updated 7 months ago
4HonoJs doesn't support render for async components so the style is off for the home page.
5
6And the state changes don't register in html rendering so thinking of using react instead.
7
8Migrated from folder: Archive/whoIsHiring

forbetHeadermain.tsx1 match

@nmsilva•Updated 7 months ago
1/** @jsxImportSource https://esm.sh/react */
2
3const ForbetHeader = () => {

bikeInventorymain.tsx3 matches

@all•Updated 7 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";
4import { init, tx, id } from "https://esm.sh/@instantdb/core@0.12.12";
5

design32x32bitmapmain.tsx10 matches

@chekos•Updated 7 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 7 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() {

vt-discord4 file matches

@boucher•Updated 3 days ago
Starter template with client-side React & Hono server

diceRollerUI1 file match

@dcm31•Updated 3 days ago
A web-based dice roller using React on Val Town
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