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/...?q=react&page=18&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 17012 results for "react"(4587ms)

MusicPracticeTodoApp.tsx4 matches

@buzdygan•Updated 2 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { renderToString } from "npm:react-dom@18.2.0/server";
3
4// TodoApp.tsx
5"use client"; // opt into client‑side interactivity
6import { useEffect, useState } from "npm:react";
7
8interface Todo {
25 }, []);
26
27 const add = async (e: React.FormEvent) => {
28 e.preventDefault();
29 await fetch("/api/todos", {

Snotel-Analyzerindex.html4 matches

@bjtitus•Updated 3 days ago
24
25 <script type="module">
26 import React, { useState, useEffect } from 'https://esm.sh/react@18.2.0?deps=react@18.2.0';
27 import ReactDOM from 'https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0,react-dom@18.2.0';
28
29 function App() {
212 }
213
214 const root = ReactDOM.createRoot(document.getElementById('root'));
215 root.render(React.createElement(App));
216 </script>
217</body>

Snotel-AnalyzerREADME.md1 match

@bjtitus•Updated 3 days ago
13- `backend/index.ts` - Main Hono server with API endpoints
14- `frontend/index.html` - Main HTML template
15- `frontend/index.tsx` - React frontend application
16- `shared/types.ts` - Shared TypeScript types
17

townie-126ValTownLogo.tsx1 match

@dinavinter•Updated 3 days ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2
3export function ValTownLogo () {

townie-126useUser.tsx1 match

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

townie-126useUsageStats.ts1 match

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

townie-126useScrollToBottom.tsx1 match

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

townie-126useProject.tsx1 match

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

townie-126useProjects.tsx1 match

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

townie-126useLoadingFavicon.ts1 match

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

tanstackReactHonoExample10 file matches

@laurynas•Updated 6 hours ago

tanstackReactHonoExample10 file matches

@charmaine•Updated 12 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