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/$2?q=react&page=1514&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 15997 results for "react"(1330ms)

hiraganaWordBuildermain.tsx3 matches

@ashryanio•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";
4import { blob } from "https://esm.town/v/std/blob";
5

scholarlyIvoryWombatmain.tsx4 matches

@stevekrouse•Updated 8 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";
4import Cerebras from "https://esm.sh/@cerebras/cerebras_cloud_sdk";
5
26 }, [htmlOutput]);
27
28 const sendMessage = async (e?: React.FormEvent) => {
29 e?.preventDefault();
30 if (input.trim() === "") return;

debatePollAppmain.tsx3 matches

@laur3n•Updated 8 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";
4import Chart from "https://esm.sh/chart.js/auto";
5

SimpleAdditionmain.tsx4 matches

@efoley•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() {
38 };
39
40 const handleSubmit = (e: React.FormEvent) => {
41 e.preventDefault();
42 const correctAnswer = num1 + num2;

getJsonAndRenderAsImagemain.tsx3 matches

@ashryanio•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";
4import { blob } from "https://esm.town/v/std/blob";
5

cardSortDragDropAppmain.tsx5 matches

@trob•Updated 8 months ago
1/** @jsxImportSource https://esm.sh/react */
2import React from "https://esm.sh/react@18.2.0";
3import { useState, useEffect, Component } from "https://esm.sh/react@18.2.0";
4import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
5import { DragDropContext, Droppable, Draggable } from "https://esm.sh/react-beautiful-dnd@13.1.1";
6
7class ErrorBoundary extends Component {

getBlobAndRenderAsImagemain.tsx3 matches

@ashryanio•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";
4import { blob } from "https://esm.town/v/std/blob";
5

getJsonAndRenderAsImageREADME.md4 matches

@ashryanio•Updated 8 months ago
1# getJsonAndRenderAsImage
2
3Shows how to get a JSON object containing a base64 imaged stored in Val Town blob storage and render it as an image in the DOM with React.
4
5## Setup
221. Fetching the JSON:
23
24 - The client-side React component makes a fetch request to "/image".
25 - This request is handled by our server function.
26
485. Client-side handling:
49
50 - The fetch request in the React component receives the Response.
51 - We call `response.json()` to parse the JSON object from the Response.
52
59
60
617. Updating the React state:
62
63 - We set the data URL as the state of our component.

statusmain.tsx3 matches

@cjpais•Updated 8 months ago
1/** @jsxImportSource https://esm.sh/react */
2import { sqlite } from "https://esm.town/v/std/sqlite?v=6";
3import { html } from "https://esm.town/v/stevekrouse/html";
4import { SparklineSVG } from "https://esm.town/v/stevekrouse/sparklineSVGReact";
5import { renderToString } from "npm:react-dom/server";
6
7function StatusRow({ rows }) {

csvToSqliteUploadermain.tsx3 matches

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

hanabi3 file matches

@jxnblk•Updated 32 mins ago
React Router for Hono in Val Town
Discord-to-Linear

Discord-to-Linear4 file matches

@charmaine•Updated 19 hours ago
Discord -> Linear ticket based on emoji reaction trigger
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