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=1201&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 15895 results for "react"(6141ms)

lastloginREADME.md4 matches

@charmaine•Updated 2 months ago
30* If email, show that user's content, and a logout link to "/auth/logout"; if no email, show login options.
31* `import { LoginWithGoogleButton } from "https://esm.town/v/stevekrouse/LoginWithGoogleButton"`
32* Use the <LoginWithGoogleButton /> React Component, optionally supplying the `text` attribute
33* Add "via LastLogin" underneat LoginWithGoogleButton, centered, secondary text, linking to https://lastlogin.io/
34* Pass the email from the server to the client-side code if using React hydration or similar techniques.
35
36### How it works
37
381. Your users click on the <LoginWithGoogleButton /> React Component in your app
392. The <LoginWithGoogleButton /> opens a new window to /auth/login?provider=google in your app
403. This middleware directs them to log into Google via LastLogin
64* If email, show that user's content, and a logout link to "/auth/logout";
65* If no email, add a link to "Login or Sign Up" to "/auth/login"
66* Pass the email from the server to the client-side code if using React hydration or similar techniques.
67
68### How it works

cerebras_coderindex10 matches

@Miraj•Updated 2 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>

MEDIANALIZE_PROMedicalreport.tsx5 matches

@UndiscoverableERA•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useCallback, useRef } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function App() {
17 const fileInputRef = useRef<HTMLInputElement>(null);
18
19 const handleFileUpload = useCallback((event: React.DragEvent<HTMLDivElement> | React.ChangeEvent<HTMLInputElement>) => {
20 event.preventDefault();
21 const files = 'dataTransfer' in event
34 }, []);
35
36 const handleDragOver = (event: React.DragEvent<HTMLDivElement>) => {
37 event.preventDefault();
38 };

MEDIANALIZE_PROhealthcare.tsx4 matches

@UndiscoverableERA•Updated 2 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 Logo() {
49 const [showWelcome, setShowWelcome] = useState(true);
50
51 const handleSubmit = async (e: React.FormEvent) => {
52 e.preventDefault();
53 if (!inputValue.trim()) return;

MEDIANALIZE_PROindex.tsx7 matches

@UndiscoverableERA•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useRef } from "https://esm.sh/react@18.2.0";
3import ReactDOM from "https://esm.sh/react-dom@18.2.0";
4import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
5import {
6 BrowserRouter as Router,
8 Route,
9 Link
10} from "https://esm.sh/react-router-dom@6.22.3?deps=react@18.2.0,react-dom@18.2.0";
11
12// Material UI imports with version pinning
14 ThemeProvider,
15 createTheme
16} from "https://esm.sh/@mui/material@5.15.14/styles?deps=react@18.2.0";
17import {
18 Container,
25 CardMedia,
26 SvgIcon
27} from "https://esm.sh/@mui/material@5.15.14?deps=react@18.2.0";
28
29const theme = createTheme({

stirringIndigoPorpoisemain.tsx2 matches

@yugini•Updated 2 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) => {

project_updates_webhookApp.tsx6 matches

@shouser•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3import { WebhookForm } from "./WebhookForm.tsx";
4
5export function App({ thisProjectURL }: { thisProjectURL?: string }) {
6 const [webhooks, setWebhooks] = React.useState([]);
7 const [loading, setLoading] = React.useState(true);
8 const [notification, setNotification] = React.useState({ show: false, message: "", type: "" });
9
10 const fetchWebhooks = async () => {
42 };
43
44 React.useEffect(() => {
45 fetchWebhooks();
46 }, []);

project_updates_webhookWebhookForm.tsx8 matches

@shouser•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React from "https://esm.sh/react@18.2.0";
3
4export function WebhookForm({ onSubmit }: { onSubmit: () => void }) {
5 const [projectId, setProjectId] = React.useState("");
6 const [webhookUrl, setWebhookUrl] = React.useState("");
7 const [event, setEvent] = React.useState("FilesCreated");
8 const [isSubmitting, setIsSubmitting] = React.useState(false);
9 const [error, setError] = React.useState("");
10
11 const handleSubmit = async (e: React.FormEvent) => {
12 e.preventDefault();
13 setError("");

loanWebApplicationmain.tsx5 matches

@harsha_2506•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2/** @jsxImportSource https://esm.sh/react@18.2.0 */
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import React, { useState } from "https://esm.sh/react@18.2.0";
5import * as ReactJSXRuntime from "https://esm.sh/react@18.2.0/jsx-runtime";
6
7// Enhanced Bank Details with Private and Public Banks

tradingSignalsAppmain.tsx4 matches

@HTKhan19•Updated 2 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
5// Predefined VIP license keys, admin key, and public key
36 };
37
38 const handleKeySubmit = async (e: React.FormEvent) => {
39 e.preventDefault();
40

MiniAppStarter10 file matches

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

ReactHonoStarterTests4 file matches

@wolf•Updated 7 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