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/$%7Burl%7D?q=react&page=803&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 10244 results for "react"(2851ms)

allTheFrontendBackendPatternshttp3 matches

@maxm•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useState } from "https://esm.sh/react@18.2.0";
4
5function Counter() {

allTheFrontendBackendPatternsfrontend.ts4 matches

@maxm•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
4
5function App() {
8 <div>
9 <style>{`body { font-family: sans-serif; }`}</style>
10 <h1>React Component!</h1>
11 <p>You clicked {count} times</p>
12 <button onClick={() => setCount(count + 1)}>

charmainesStatussparklineSVG1 match

@charmaine•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2export function SparklineSVG({ strokeWidth = 2, data = [], fill = "none", stroke = "black" }) {
3 const padding = 2;

allTheFrontendBackendPatternshttpReact2 matches

@maxm•Updated 3 months ago
1/** @jsxImportSource npm:react */
2import { renderToString } from "npm:react-dom/server";
3export default async function(req: Request): Promise<Response> {
4 return new Response(

logmeinmw2 matches

@maxm•Updated 3 months ago
1/** @jsxImportSource npm:react */
2import { extractProjectValInfo } from "https://esm.town/v/maxm/extractProjectValInfo";
3import { renderToString } from "npm:react-dom/server";
4import { type Config, DB } from "./db";
5import { getSessionKey, setSession } from "./sessionCookie";
status

statussparklineSVG1 match

@stevekrouse•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2export function SparklineSVG({ strokeWidth = 2, data = [], fill = "none", stroke = "black" }) {
3 const padding = 2;

NeuralCanvasmain.tsx3 matches

@toowired•Updated 3 months ago
23 <script src="https://esm.town/v/std/catch"></script>
24 <script type="module">
25 import React from 'https://esm.sh/react@18.2.0';
26 import { createRoot } from 'https://esm.sh/react-dom@18.2.0/client';
27 import App from '${import.meta.url.replace('main', 'App')}';
28
29 createRoot(document.getElementById('root')).render(React.createElement(App));
30 </script>
31 </body>

cerebras_codermain.tsx10 matches

@Narayan•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import Cerebras from "https://esm.sh/@cerebras/cerebras_cloud_sdk";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0";
4import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter?deps=react@18.2.0,react-dom@18.2.0";
5import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
6import { STARTER_PROMPTS } from "https://esm.town/v/stevekrouse/cerebras_coder_prompts";
7
31}: {
32 prompt: string;
33 setPrompt: React.Dispatch<React.SetStateAction<string>>;
34 handleSubmit: (e: React.FormEvent) => void;
35 handleStarterPromptClick: (promptItem: PromptItem) => void;
36}) {
117
118function App() {
119 const previewRef = React.useRef<HTMLDivElement>(null);
120 const [prompt, setPrompt] = useState("");
121 const [projectId, setProjectId] = useState<number | null>(null);
175 }
176
177 async function handleSubmit(e: React.FormEvent | string) {
178 if (typeof e !== "string") {
179 e.preventDefault();
674 </div>
675 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
676 <React.Fragment key={iframeKey}>
677 <iframe
678 srcDoc={code}
680 className="w-full grow"
681 />
682 </React.Fragment>
683 </div>
684 </div>

BikramNpExplorerAppmain.tsx4 matches

@air•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function App() {
13 const [isLoading, setIsLoading] = useState(false);
14
15 const handleSubmit = async (e: React.FormEvent) => {
16 e.preventDefault();
17 if (!input.trim()) return;

WiFi_Vision_Systemmain.tsx3 matches

@AIWB•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
4
5function WifiVisionSystem() {

StarterPackFeeds11 file matches

@moe•Updated 3 hours ago
Hono + React + Tailwind + Farcaster Mini App Starter Project

FullstackStarter30 file matches

@wolf•Updated 4 hours ago
Starter template with client-side React & Hono server
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