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?q=react&page=1151&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 16574 results for "react"(6093ms)

FarcasterMiniAppStoreExample.tsx3 matches

@moeUpdated 2 months ago
1/** @jsxImportSource https://esm.sh/react@19 */
2import { useState } from "https://esm.sh/react@19";
3
4export function Example() {
6 <div class="m-5 mb-8">
7 <h1 class="text-4xl font-semibold mb-2">Mini App Starter</h1>
8 <div class="opacity-50">Hono + React + Tailwind + Farcaster Mini App Starter Project on Val Town</div>
9 </div>
10 );

MiniAppStarteruseQuery.ts2 matches

@moeUpdated 2 months ago
1/** @jsxImportSource https://esm.sh/react@19 */
2import { useEffect, useState } from "https://esm.sh/react@19";
3
4export const useQuery = (deps, asyncFn) => {

FixItWandLoading.tsx1 match

@wolfUpdated 2 months ago
1/** @jsxImportSource https://esm.sh/react@19.0.0 */
2
3export function Skeleton() {

FixItWandWorkOrderList.tsx2 matches

@wolfUpdated 2 months ago
1/** @jsxImportSource https://esm.sh/react@19.0.0 */
2import { useState } from "https://esm.sh/react@19.0.0";
3import { WorkOrder } from "../../../backend/db/schemas_http.ts";
4import { Skeleton } from "../Loading.tsx";

FixItWandauth.tsx2 matches

@wolfUpdated 2 months ago
1/** @jsxImportSource https://esm.sh/react@19.0.0 */
2
3import type { JwtVariables } from "npm:hono/jwt";
5import { setCookie } from "npm:hono/cookie";
6import { sign } from "npm:hono/jwt";
7import { renderToString } from "npm:react-dom/server";
8import { Hono } from "npm:hono";
9import { sendEmail } from "../utils.ts";

FixItWandHome.tsx3 matches

@wolfUpdated 2 months ago
1/** @jsxImportSource https://esm.sh/react@19.0.0 */
2import { useEffect, useState } from "https://esm.sh/react@19.0.0";
3import { useAuth } from "../hooks/useAuth.ts";
4import { Link } from "https://esm.sh/react-router-dom@7.4.1?deps=react@19.0.0,react-dom@19.0.0";
5import * as api from "../crud/workorders.ts";
6import { WorkOrder } from "../../backend/db/schemas_http.ts";

FixItWandconsts.tsx1 match

@wolfUpdated 2 months 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 2 months 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 2 months 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 2 months 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

reactHonoStarter4 file matches

@nbbaierUpdated 45 mins ago

reactHonoStarter4 file matches

@ruleoUpdated 16 hours ago
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