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%22Image%20title%22?q=react&page=1114&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 16193 results for "react"(3033ms)

FixItWandconsts.tsx1 match

@wolfUpdated 1 month ago
1/** @jsxImportSource https://esm.sh/react@19.0.0 */
2
3// Use environment variables or fallback to default values for development

Kaliwebhook17 matches

@augustohpUpdated 1 month ago
1import { appendMessage } from "https://esm.town/v/augustohp/Kali/dify/api";
2import { userCreateFromWebhook } from "https://esm.town/v/augustohp/Kali/orm";
3import { react, sendText } from "https://esm.town/v/augustohp/Kali/zapi/api";
4import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
5import { telegramSendMessage } from "https://esm.town/v/vtdocs/telegramSendMessage";
42};
43
44type Reaction = {
45 type: "emoji" | "custom_emoji" | "paid";
46 emoji?: string;
48};
49
50type ReactionReceived = {
51 chat: Chat;
52 message_id: number;
53 from: User;
54 date: number;
55 old_reaction: Reaction[];
56 new_reaction: Reaction[];
57};
58
78
79/**
80 * Sets the reaction of a message.
81 */
82export async function setReaction(
83 chatId: number,
84 messageId: number,
85 reaction: string,
86 isBig: boolean = false,
87): Promise<boolean> {
88 const reactionType: Reaction[] = [{ type: "emoji", emoji: reaction }];
89 let url = new URL(`https://api.telegram.org/bot${telegramToken}/setMessageReaction`);
90 url.searchParams.append("chat_id", chatId.toString());
91 url.searchParams.append("message_id", messageId.toString());
92 url.searchParams.append("reaction", JSON.stringify(reactionType));
93 url.searchParams.append("is_big", isBig.toString());
94 const r = await fetchJSON(url.toString());
95 console.log("Setting reaction...");
96 console.log(r);
97 return r.ok === true;
100async function receiveMessage(r: MessageReceived): Promise<Response> {
101 console.log(r);
102 await setReaction(r.chat.id, r.message_id, "👀");
103 let photoStream: Uint8Array | undefined = undefined;
104 let text = r.text;
113 });
114 console.log(resZap);
115 await setReaction(r.chat.id, r.message_id, "👍");
116 return Response.json({ ok: true });
117}
118
119async function receiveReaction(r: ReactionReceived): Promise<Response> {
120 console.log(r);
121 return Response.json({ ok: true });
138 if (r.message) {
139 return await receiveMessage(r.message);
140 } else if (r.message_reaction) {
141 return await receiveReaction(r.message_reaction);
142 }
143

reactRouter7ExampleApp.tsx3 matches

@stevekrouseUpdated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { Outlet, useNavigation } from "https://esm.sh/react-router@7.5.0?deps=react@18.2.0,react-dom@18.2.0";
3import React from "https://esm.sh/react@18.2.0";
4import { LoadingSpinner } from "./LoadingSpinner.tsx";
5

reactRouter7ExampleSearchForm.tsx3 matches

@stevekrouseUpdated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import { Form, useNavigation, useSearchParams } from "https://esm.sh/react-router@7.5.0?deps=react@18.2.0,react-dom@18.2.0";
4import { LoadingSpinner } from "./LoadingSpinner.tsx";
5
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3
4interface LoadingSpinnerProps {

mapsclonerREADME.md4 matches

@mattiUpdated 1 month ago
1# React Hono Starter
2
3This app is a starter template for client-side React and server-side Hono.
4
5- **Remix** this starter template on the top right to get started.
7- The **entrypoint** is `/backend/index.ts`. That's the backend HTTP server, which also serves the all the frontend assets.
8
9- The **client-side entrypoint** is `/frontend/index.html`, which in turn imports `/frontend/index.tsx`, which in turn imports the React app from `/frontend/components/App.tsx`.
10
11[React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a fuller featured example project, with a SQLite database table, queries, client-side CSS and a favicon, and some shared code that runs on both client and server.

mapsclonerindex.tsx2 matches

@mattiUpdated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import { App } from "./components/App.tsx";
4

mapsclonerindex.html1 match

@mattiUpdated 1 month ago
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>React Hono Val Town Starter</title>
7 <link rel="stylesheet" href="/public/style.css">
8 <link rel="icon" href="/public/favicon.svg" sizes="any" type="image/svg+xml">

mapsclonerApp.tsx3 matches

@mattiUpdated 1 month ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useState } from "https://esm.sh/react@18.2.0";
3
4export function App() {
6 return (
7 <div>
8 <h1>Val Town React + Hono Starter</h1>
9 I've been clicked <button onClick={() => setClicked((c) => c + 1)}>{clicked}</button> times
10 </div>

blogSocialLinks.tsx1 match

@cdignamUpdated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { BlueskyIcon, DiscordIcon, GitHubIcon, RSSIcon, TwitterIcon } from "./icons.tsx";
3

reactHonoStarter4 file matches

@halfstackUpdated 5 hours ago

MiniAppStarter10 file matches

@moeUpdated 7 hours ago
Hono + React + Tailwind + Farcaster Mini App 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