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%22Image%20title%22?q=react&page=1261&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 15999 results for "react"(4002ms)

cerebras_coderindex10 matches

@Priyanshu_23•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?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>

blogIdeaGeneratorAppmain.tsx4 matches

@melissanf•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useCallback, useEffect } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5// CSS definition moved up to be accessible in server function
29 const [shareLink, setShareLink] = useState<string | null>(null);
30
31 const handleSubmit = async (e: React.FormEvent) => {
32 e.preventDefault();
33

productiveIndigoJaymain.tsx2 matches

@melissanf•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 **/
2import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
3
4export default (req: Request) => {

LobJogtoomain.tsx3 matches

@naskask•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
5const NO_PHRASES = [

valentinemain.tsx3 matches

@naskask•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
5const MAYBE_PHRASES = [

valentinemain.tsx3 matches

@nightowlkun•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
5const NO_PHRASES = [

saunaTemperatureDashboardmain.tsx7 matches

@jhiller•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import {
3 CategoryScale,
10 Tooltip,
11} from "https://esm.sh/chart.js@4.4.1";
12import { Line } from "https://esm.sh/react-chartjs-2@5.2.0?deps=react@18.2.0,react-dom@18.2.0,chart.js@4.4.1";
13import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
14import React, { Suspense, useEffect, useState } from "https://esm.sh/react@18.2.0";
15
16// Utility function to convert Celsius to Fahrenheit
39
40// Error Boundary Component
41class ErrorBoundary extends React.Component {
42 constructor(props) {
43 super(props);
294 const root = createRoot(document.getElementById("root"));
295 root.render(
296 <React.StrictMode>
297 <ErrorBoundary>
298 <App />
299 </ErrorBoundary>
300 </React.StrictMode>,
301 );
302 } catch (error) {

linkInBioTemplatemain.tsx2 matches

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

shoppingPlatformAImain.tsx3 matches

@Priyansh•Updated 3 months 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() {

priyanshCartoonAppmain.tsx3 matches

@Priyansh•Updated 3 months 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
5const PRIYANSH_VIDEOS = [
hanabi

hanabi3 file matches

@jxnblk•Updated 2 hours ago
React Router for Hono in Val Town
Discord-to-Linear

Discord-to-Linear4 file matches

@charmaine•Updated 22 hours ago
Discord -> Linear ticket based on emoji reaction trigger
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