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/$%7Bsuccess?q=react&page=71&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 9742 results for "react"(1016ms)

TownieuseAuth.tsx2 matches

@valdottown•Updated 1 week ago
1import { useLocalStorage } from "https://esm.sh/react-use?dev&deps=react@18.2.0&react-dom@18.2.0";
2import { useState } from "https://esm.sh/react@18.2.0?dev";
3
4const TOKEN_KEY = "bearer";

markdownBlogStarterLayout.tsx3 matches

@Abdikeni•Updated 1 week ago
1/** @jsxImportSource npm:react@18.2.0 */
2import type { ReactNode } from "npm:react@18.2.0";
3
4export function Layout({ children }: { children: ReactNode }) {
5 return (
6 <html lang="en">

markdownBlogStarterindex.tsx4 matches

@Abdikeni•Updated 1 week ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import Markdown from "https://esm.sh/react-markdown@9?deps=react@18.2.0";
3import { listFiles, readFile } from "https://esm.town/v/std/utils@85-main/index.ts";
4import { renderToString } from "npm:react-dom@18.2.0/server";
5import { Layout } from "./Layout.tsx";
6
44}
45
46function html(children: React.ReactNode) {
47 return new Response(
48 renderToString(

TownieuseUsageStats.ts1 match

@valdottown•Updated 1 week ago
1import { useEffect } from "https://esm.sh/react@18.2.0?dev";
2
3export function useUsageStats (messages: any[], usages: any[]) {

TownieuseScrollToBottom.tsx1 match

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

TownieuseLoadingFavicon.ts1 match

@valdottown•Updated 1 week ago
1import { useEffect } from "https://esm.sh/react@18.2.0?dev";
2
3function setLoadingFavicon() {

TownieTODOs.md1 match

@valdottown•Updated 1 week ago
1- [ ] Give it a tool to make an HTTP request to its own endpoint to test things!
2- [x] Get React Router working on the client & move off localstorage for storing page state
3- [ ] When it hits the max number of steps, detect that and give the user a button (or instructions on how) to get it to continue (neverstew mentioned this)
4- [x] Make it look good

TownieRequireAuthRoute.tsx2 matches

@valdottown•Updated 1 week ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import {
3 Outlet,
4 Navigate,
5 useLocation,
6} from "https://esm.sh/react-router@7?dev&deps=react@18.2.0&react-dom@18.2.0";
7import { useAuth } from "../hooks/useAuth.tsx";
8

TowniePreview.tsx5 matches

@valdottown•Updated 1 week ago
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useLocalStorage } from "https://esm.sh/react-use?dev&deps=react@18.2.0&react-dom@18.2.0";
3import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0?dev";
4import { RefreshIcon } from "./icons.tsx";
5
39 }, [messages, running, currentEndpoint, customPath]);
40
41 const handleEndpointChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
42 setSelectedEndpointIndex(Number(e.target.value));
43 };
44
45 const handlePathChange = (e: React.ChangeEvent<HTMLInputElement>) => {
46 setCustomPath(e.target.value);
47 };

TownieNotFoundRoute.tsx1 match

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

new_website

@wolf•Updated 3 hours ago
Starter template with client-side React & Hono server

reactHonoStarter4 file matches

@niceandneat•Updated 4 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