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=662&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 8584 results for "react"(1863ms)

textToGeneratemain.tsx3 matches

@KALPESHPATEL•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { Hono } from "https://esm.sh/hono";
3import { html } from "https://esm.sh/hono/helper";
4import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
5import React, { useState } from "https://esm.sh/react@18.2.0";
6
7function App() {

BMICalculatormain.tsx3 matches

@KALPESHPATEL•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 App() {

cerebrasTemplatemain.tsx3 matches

@rupesh0745•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 App() {

cerebrasTemplatemain.tsx3 matches

@devin78988•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 App() {

characterGuessermain.tsx3 matches

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

flowingAmethystHippopotamusmain.tsx3 matches

@gokulnpc•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,react-dom@18.2.0";
3import React, { useCallback, useState } from "https://esm.sh/react@18.2.0";
4import { OpenAI } from "https://esm.town/v/std/openai";
5

prosperousYellowMulemain.tsx10 matches

@gokulnpc•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect, 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 SyntaxHighlighter from "https://esm.sh/react-syntax-highlighter@15.5.0";
6import { materialDark } from "https://esm.sh/react-syntax-highlighter@15.5.0/dist/esm/styles/prism";
7
8// Error Boundary Component
9class ErrorBoundary extends React.Component {
10 constructor(props) {
11 super(props);
18
19 componentDidCatch(error, errorInfo) {
20 console.error("React Error:", error, errorInfo);
21 }
22
174 const root = createRoot(rootElement);
175 root.render(
176 <React.StrictMode>
177 <App />
178 </React.StrictMode>
179 );
180 } else {

cerebras_codermain.tsx10 matches

@diegoasua•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
80}: {
81 prompt: string;
82 setPrompt: React.Dispatch<React.SetStateAction<string>>;
83 handleSubmit: (e: React.FormEvent) => void;
84 handleStarterPromptClick: (promptItem: PromptItem) => void;
85}) {
169
170function App() {
171 const previewRef = React.useRef<HTMLDivElement>(null);
172 const [prompt, setPrompt] = useState("");
173 const [projectId, setProjectId] = useState<number | null>(null);
227 }
228
229 async function handleSubmit(e: React.FormEvent | string) {
230 if (typeof e !== "string") {
231 e.preventDefault();
733 </div>
734 <div className="bg-white w-full h-full flex flex-col grow rounded-xl border-2 border-white overflow-hidden">
735 <React.Fragment key={iframeKey}>
736 <iframe
737 srcDoc={code}
739 className="w-full grow"
740 />
741 </React.Fragment>
742 </div>
743 </div>

cerebras_searchermain.tsx3 matches

@meamitpatil•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/react */
2import React, { useState } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5const DEFAULT_SEARCHES = [

cerebrasTemplatemain.tsx3 matches

@siddz415•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 App() {

vt-discord4 file matches

@boucher•Updated 1 day ago
Starter template with client-side React & Hono server

diceRollerUI1 file match

@dcm31•Updated 1 day ago
A web-based dice roller using React on Val Town
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