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=151&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 11687 results for "react"(1075ms)

stockAppindex.html4 matches

@prashamtrivedi•Updated 6 days ago
30 <div id="root"></div>
31
32 <!-- React and ReactDOM from esm.sh (pinned versions as per guidelines) -->
33 <!-- The ?deps=react@18.2.0,react-dom@18.2.0 is important for Val Town compatibility -->
34 <script type="module">
35 import { render, h } from "https://esm.sh/preact@10.19.6";
36 // The main application component will be imported from index.tsx
37 import App from "/frontend/index.tsx"; // Assuming index.tsx is the entry point
41 render(h(App), rootElement);
42 } else {
43 console.error("Root element not found. Preact app cannot be mounted.");
44 }
45 </script>

stockAppAppHeader.tsx2 matches

@prashamtrivedi•Updated 6 days ago
1/** @jsxImportSource https://esm.sh/preact@10.19.6 */
2import { h, FunctionComponent, JSX } from "https://esm.sh/preact@10.19.6";
3import { User } from "../../shared/types.ts"; // Import User type
4

vectorsserver.tsx5 matches

@jxnblk•Updated 6 days ago
1/** @jsxImportSource ./jsx */
2import { Hono } from "npm:hono@4";
3import * as React from "https://esm.sh/react@19";
4import ReactDOMServer from "https://esm.sh/react-dom@19/server";
5import {
6 createStaticHandler,
7 createStaticRouter,
8 StaticRouterProvider,
9} from "https://esm.sh/react-router";
10import routes from "./routes/index.tsx";
11
19});
20
21// react app
22app.get("*", async (c) => {
23 const { query, dataRoutes } = createStaticHandler(routes);
25 const router = createStaticRouter(dataRoutes, context);
26
27 let html = await ReactDOMServer.renderToReadableStream(
28 <StaticRouterProvider
29 router={router}

stockAppQuickActions.tsx2 matches

@prashamtrivedi•Updated 6 days ago
1/** @jsxImportSource https://esm.sh/preact@10.19.6 */
2import { h, FunctionComponent, JSX } from "https://esm.sh/preact@10.19.6";
3
4interface QuickActionsProps {

TownieuseUser.tsx1 match

@mackaber•Updated 6 days ago
1import { useState, useEffect } from "react";
2
3const USER_ENDPOINT = "/api/user";

TownieuseUsageStats.ts1 match

@mackaber•Updated 6 days ago
1import { useEffect } from "react";
2
3export function useUsageStats(messages: any[], usages: any[]) {

TownieuseScrollToBottom.tsx1 match

@mackaber•Updated 6 days ago
1import { useEffect, useRef } from 'https://esm.sh/react@18.2.0?dev';
2
3

TownieuseProject.tsx1 match

@mackaber•Updated 6 days ago
1import { useState, useEffect } from "react";
2
3const PROJECT_ENDPOINT = "/api/project";

TownieuseProjects.tsx1 match

@mackaber•Updated 6 days ago
1import { useState, useEffect } from "react";
2
3const ENDPOINT = "/api/projects-loader";

TownieuseLoadingFavicon.ts1 match

@mackaber•Updated 6 days ago
1import { useEffect } from "react";
2
3function setLoadingFavicon() {

reactHonoStarter_remix_665424 file matches

@johnroyall•Updated 1 hour ago
Starter template with client-side React & Hono server

reactHonoExample9 file matches

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