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/$%7Bart_info.art.src%7D?q=react&page=142&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 9665 results for "react"(1293ms)

cerebras_coderindex.ts10 matches

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

stirringPlumXerinaemain.tsx3 matches

@samualUpdated 2 weeks ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import { blob } from "https://esm.town/v/std/blob";
5

carouselmain.tsx1 match

@salonUpdated 2 weeks ago
195 transform: translateY(-4px);
196 box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
197 transition-duration: var(--transition-duration-fast); /* Faster reaction on hover */
198 }
199

mini-remixREADME.md1 match

@probablycoreyUpdated 2 weeks ago
1# Server-side Render React Mini Framework
2
3This is very experimental, more of a prototype of an architecture, than a true framework

linkInBioTemplatemain.tsx2 matches

@MarilynneUpdated 2 weeks ago
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
3
4export default async function(req: Request) {

Twitter_Trakermain.tsx3 matches

@HajerOmerUpdated 2 weeks 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 formatDate(dateString: string) {

skillsmain.tsx3 matches

@ifeUpdated 2 weeks ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function App() {

nursingStudentSupportHubmain.tsx12 matches

@fave_24Updated 2 weeks ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect, useRef } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5// [Previous ASSISTANTS configuration remains unchanged]
33 content: input,
34 timestamp: new Date().toLocaleString(),
35 reactions: [],
36 replies: [],
37 parentId: replyTo ? replyTo.id : null
58 };
59
60 const addReaction = (messageId, reaction) => {
61 setMessages(prev =>
62 prev.map(msg => {
64 return {
65 ...msg,
66 reactions: [...(msg.reactions || []), reaction]
67 };
68 }
69 // Check replies for nested reactions
70 if (msg.replies) {
71 const updatedReplies = msg.replies.map(reply =>
72 reply.id === messageId
73 ? {...reply, reactions: [...(reply.reactions || []), reaction]}
74 : reply
75 );
96 <div className="message-meta">
97 <small>{msg.timestamp}</small>
98 <div className="reactions">
99 <button onClick={() => setReplyTo(msg)}>💬 Reply</button>
100 <button onClick={() => addReaction(msg.id, "❤️")}>❤️</button>
101 <button onClick={() => addReaction(msg.id, "👍")}>👍</button>
102 </div>
103 {msg.reactions && msg.reactions.map((r, idx) => <span key={idx}>{r}</span>)}
104 </div>
105 {msg.replies && msg.replies.map(reply => renderMessage(reply, true))}

markdownBlogStarterLayout.tsx3 matches

@voskUpdated 2 weeks 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

@voskUpdated 2 weeks 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(

new_website

@wolfUpdated 6 hours ago
Starter template with client-side React & Hono server

StarterPackFeeds10 file matches

@moeUpdated 23 hours ago
Hono + React + Tailwind + Farcaster Mini App Starter Project
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