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/$%7Bsuccess?q=react&page=857&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 9247 results for "react"(1549ms)

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>

calendarEventExtractormain.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/client";
8import { Calendar, momentLocalizer } from "https://esm.sh/react-big-calendar";
9import moment from "https://esm.sh/moment";
10
11// Set up the localizer for react-big-calendar
12const localizer = momentLocalizer(moment);
13
137 <head>
138 <title>Calendar Event Extractor</title>
139 <link rel="stylesheet" href="https://esm.sh/react-big-calendar/lib/css/react-big-calendar.css">
140 <style>${css}</style>
141 </head>

closedChocolateMarmosetmain.tsx3 matches

@jdan•Updated 8 months ago
1/** @jsxImportSource https://esm.sh/react */
2import cheerio from "https://esm.sh/cheerio@1.0.0-rc.12";
3import dagre from "https://esm.sh/cytoscape-dagre@2.5.0";
4import cytoscape from "https://esm.sh/cytoscape@3.23.0";
5import React, { useEffect, useRef, useState } from "https://esm.sh/react";
6import { createRoot } from "https://esm.sh/react-dom/client";
7
8cytoscape.use(dagre);

lucia_middleware_vanillamain.tsx2 matches

@yawnxyz•Updated 8 months ago
3// The main tradeoff is the complexity of setting up Lucia, but it offers robust auth features.
4
5/** @jsxImportSource https://esm.sh/react */
6import { ValTownAdapter } from "https://esm.town/v/yawnxyz/lucia_adapter_valtown";
7import { createUser, getUser, verifyPassword } from "https://esm.town/v/yawnxyz/lucia_sqlite";
8import { Lucia, Session, User } from "npm:lucia@3.0.1";
9import { renderToString } from "npm:react-dom/server";
10import { CookieJar } from "https://deno.land/x/cookies/mod.ts";
11

TravelAppmain.tsx6 matches

@namwen•Updated 8 months ago
1/** @jsxImportSource https://esm.sh/react */
2import { ExternalLinkIcon } from "https://esm.sh/@chakra-ui/icons";
3import {
10 useColorModeValue,
11 VStack,
12} from "https://esm.sh/@chakra-ui/react";
13import * as React from "https://esm.sh/react";
14// import React, { useEffect, useState } from "https://esm.sh/react";
15import { createRoot } from "https://esm.sh/react-dom/client";
16
17import itinerary from "https://esm.town/v/namwen/veryTealAardvark";
18
19import { renderToString } from "npm:react-dom/server";
20
21function printItinerary() {

theHereTimesmain.tsx34 matches

@gio•Updated 8 months ago
16
17import { Loader } from "https://esm.sh/@googlemaps/js-api-loader@1.16.2";
18import ReactDOM from "https://esm.sh/react-dom@18.2.0";
19import React from "https://esm.sh/react@18.2.0";
20
21function App() {
22 const mapRef = React.useRef(null);
23 const [map, setMap] = React.useState(null);
24 const [center, setCenter] = React.useState({ lat: 40.7128, lng: -74.006 });
25 const [zoom, setZoom] = React.useState(10);
26 const [news, setNews] = React.useState([]);
27 const [locations, setLocations] = React.useState([]);
28 const [isDrawerOpen, setIsDrawerOpen] = React.useState(false);
29 const [error, setError] = React.useState(null);
30 const markersRef = React.useRef([]);
31 const [googleMaps, setGoogleMaps] = React.useState(null);
32 const [selectedLocation, setSelectedLocation] = React.useState(null);
33 const [searchQuery, setSearchQuery] = React.useState("");
34 const searchBoxRef = React.useRef(null);
35
36 React.useEffect(() => {
37 const initMap = async () => {
38 try {
106 }, []);
107
108 React.useEffect(() => {
109 if (map && locations.length > 0 && googleMaps) {
110 console.log("Updating markers. Number of locations:", locations.length);
204 };
205
206 const filteredNews = React.useMemo(() => {
207 if (!selectedLocation) return [];
208 return news.filter(article => article.title.toLowerCase().includes(selectedLocation.name.toLowerCase()));
209 }, [news, selectedLocation]);
210
211 return React.createElement(
212 "div",
213 { style: { display: "flex", flexDirection: "column", height: "100vh" } },
214 React.createElement(
215 "div",
216 { id: "search-container", className: "search-container" },
217 React.createElement("input", {
218 id: "search-input",
219 type: "text",
223 }),
224 ),
225 React.createElement("div", { ref: mapRef, style: { flexGrow: 1 } }),
226 isDrawerOpen && React.createElement(
227 "div",
228 { className: "drawer" },
229 React.createElement("button", { onClick: () => setIsDrawerOpen(false), className: "close-button" }, "×"),
230 React.createElement("h2", null, selectedLocation ? `News for ${selectedLocation.name}` : "Local News"),
231 error
232 ? React.createElement("p", { className: "error" }, error)
233 : filteredNews.length > 0
234 ? filteredNews.map((article, index) =>
235 React.createElement(
236 "div",
237 { key: index, className: "article" },
238 React.createElement("h3", null, article.title),
239 React.createElement("p", null, article.description),
240 React.createElement("a", { href: article.url, target: "_blank", rel: "noopener noreferrer" }, "Read more"),
241 )
242 )
243 : React.createElement("p", null, "No news articles found for this location."),
244 ),
245 React.createElement(
246 "div",
247 { className: "attribution" },
248 React.createElement(
249 "a",
250 {
260
261function client() {
262 ReactDOM.createRoot(document.getElementById("root")).render(React.createElement(App));
263}
264

infoboxCrawlermain.tsx3 matches

@stevekrouse•Updated 8 months ago
1/** @jsxImportSource https://esm.sh/react */
2import cheerio from "https://esm.sh/cheerio@1.0.0-rc.12";
3import dagre from "https://esm.sh/cytoscape-dagre@2.5.0";
4import cytoscape from "https://esm.sh/cytoscape@3.23.0";
5import React, { useEffect, useRef, useState } from "https://esm.sh/react";
6import { createRoot } from "https://esm.sh/react-dom/client";
7
8cytoscape.use(dagre);

infoboxCrawlermain.tsx3 matches

@jdan•Updated 8 months ago
1/** @jsxImportSource https://esm.sh/react */
2import cheerio from "https://esm.sh/cheerio@1.0.0-rc.12";
3import dagre from "https://esm.sh/cytoscape-dagre@2.5.0";
4import cytoscape from "https://esm.sh/cytoscape@3.23.0";
5import React, { useEffect, useRef, useState } from "https://esm.sh/react";
6import { createRoot } from "https://esm.sh/react-dom/client";
7
8cytoscape.use(dagre);

todoListUsingBlobmain.tsx3 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() {

valcontributionchartmain.tsx4 matches

@iamseeley•Updated 8 months ago
1// This approach will fetch data from the specified endpoint, process it to create a GitHub-style contribution chart,
2// and render it using React. We'll use the fetch API to get the data, process it to create a heatmap-like structure,
3// and then use CSS Grid to render the chart with varying shades of green based on the number of vals created each day.
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() {

IClickWolf4 file matches

@vtTestLocal•Updated 17 hours ago
Starter template with client-side React & Hono server

vt-discord4 file matches

@boucher•Updated 5 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