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%22Optional%20title%22?q=react&page=879&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 9479 results for "react"(1037ms)

windowsXpSimulatormain.tsx4 matches

@xpapla•Updated 8 months ago
1// This approach creates a Windows 98-style simulator using React for the UI and CSS for styling.
2// We'll implement a desktop with icons, a start menu, and multiple application windows including
3// My Computer, Notepad, and Paint (using jspaint.app).
4
5/** @jsxImportSource https://esm.sh/react */
6import React, { useState, useRef, useEffect } from "https://esm.sh/react";
7import { createRoot } from "https://esm.sh/react-dom/client";
8
9function App() {

craigslistScrapermain.tsx4 matches

@rochambeau314•Updated 8 months ago
1// This approach will use the fetch API to get the Craigslist page content,
2// parse it using cheerio, extract the required information,
3// and render it in a table format. We'll use React for the client-side rendering.
4
5/** @jsxImportSource https://esm.sh/react */
6import React, { useState, useEffect } from "https://esm.sh/react";
7import { createRoot } from "https://esm.sh/react-dom/client";
8
9function App() {

valTopicGenmain.tsx2 matches

@roramigator•Updated 8 months ago
4// The val provides an HTTP endpoint to view the current topic and when it will change.
5
6import { jsx } from "https://esm.sh/react/jsx-runtime";
7import { blob } from "https://esm.town/v/std/blob";
8
132export default async function server(req: Request): Promise<Response> {
133 const currentTopic = await getCurrentTopic();
134 const { renderToString } = await import("https://esm.sh/react-dom/server");
135 const topicDisplayHtml = renderToString(TopicDisplay(currentTopic));
136

honoJsxHtmlTemplatesREADME.md1 match

@yawnxyz•Updated 8 months ago
1Base working example of combining Hono, React/JSX, and html templates
2
3Migrated from folder: Experiments/hono/honoJsxHtmlTemplates

numbergamemain.tsx4 matches

@tnorthcutt•Updated 8 months ago
3 * When a valid chain is selected, the last square in the chain holds the total value rounded up to the nearest power of two,
4 * and the other squares get new random values. The player scores points based on the chain length and values.
5 * We'll use React for the UI and manage game state on the client side.
6 * The server will just serve the initial HTML and JavaScript.
7 *
17 */
18
19/** @jsxImportSource https://esm.sh/react */
20import React, { useEffect, useRef, useState } from "https://esm.sh/react";
21import { createRoot } from "https://esm.sh/react-dom/client";
22
23// Game board size

easingbattlegroundmain.tsx6 matches

@ejfox•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";
4import { BrowserRouter as Router, Route, Link, Routes } from "https://esm.sh/react-router-dom";
5
6function EasingVisualizer({ easing }) {
7 const canvasRef = React.useRef(null);
8
9 React.useEffect(() => {
10 const canvas = canvasRef.current;
11 const ctx = canvas.getContext('2d');

caniuse_notifiermain.tsx2 matches

@stevekrouse•Updated 8 months ago
1/** @jsxImportSource npm:react **/
2import { blob } from "https://esm.town/v/std/blob";
3import { email } from "https://esm.town/v/std/email";
4import { renderToString } from "npm:react-dom@18/server";
5
6const updatedKey = "caniuse-updated-at";

clickTrackerWebsitemain.tsx3 matches

@ankitkr0•Updated 8 months ago
2// We'll use SQLite for persistence to store the click count and add a confetti effect for each click.
3
4/** @jsxImportSource https://esm.sh/react */
5import React, { useState, useEffect } from "https://esm.sh/react";
6import { createRoot } from "https://esm.sh/react-dom/client";
7import confetti from 'https://esm.sh/canvas-confetti';
8

hnCloneLuciaOauthmain.tsx3 matches

@yawnxyz•Updated 8 months ago
4 * Users can upvote each post exactly once and comment on stories in an infinitely nested style.
5 */
6/** @jsxImportSource https://esm.sh/react */
7import React, { useState, useEffect } from "https://esm.sh/react";
8import { createRoot } from "https://esm.sh/react-dom/client";
9import { luciaMiddleware } from "https://esm.town/v/yawnxyz/lucia_middleware_safe";
10

muddyAmethystLimpetmain.tsx7 matches

@pdebieamzn•Updated 8 months ago
1// This calendar app will allow users to upload a PDF, extract events from it using OpenAI's GPT model,
2// and display them on a big calendar. We'll use react-big-calendar for the calendar component,
3// and pdf.js for PDF parsing. The server will handle PDF processing and event extraction.
4
5/** @jsxImportSource https://esm.sh/react */
6import React, { useState, useEffect } from "https://esm.sh/react";
7import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
8import { Calendar, momentLocalizer } from "https://esm.sh/react-big-calendar";
9import { createEvents } from "https://esm.sh/ics@3.1.0";
10import moment from "https://esm.sh/moment";
11
12// Set up the localizer for react-big-calendar
13const localizer = momentLocalizer(moment);
14
177 <head>
178 <title>Calendar Event Extractor</title>
179 <link rel="stylesheet" href="https://esm.sh/react-big-calendar/lib/css/react-big-calendar.css">
180 <style>${css}</style>
181 </head>

reactHonoStarter4 file matches

@texoport•Updated 7 hours ago

new_website

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