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%22Optional%20title%22?q=react&page=878&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 9479 results for "react"(969ms)

printedWhiteToadmain.tsx4 matches

@lazyplatypus•Updated 8 months ago
1/** @jsxImportSource https://esm.sh/react */
2import React, { useState, useEffect, useRef } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
4import Cerebras from "https://esm.sh/@cerebras/cerebras_cloud_sdk";
5
26 }, [htmlOutput]);
27
28 const sendMessage = async (e?: React.FormEvent) => {
29 e?.preventDefault();
30 if (input.trim() === "") return;

honEmeraldSnailmain.tsx4 matches

@stevekrouse•Updated 8 months ago
1/** @jsxImportSource https://esm.sh/react */
2import React, { useState, useEffect, useRef } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5const MODEL = "claude-3-sonnet-20240229";
91 }, [htmlOutput]);
92
93 const sendMessage = async (e?: React.FormEvent) => {
94 e?.preventDefault();
95 if (input.trim() === "") return;

virtualPetSimmain.tsx4 matches

@muhammad_owais_warsi•Updated 8 months ago
1// This app will create a virtual pet simulation game where users can adopt, care for, and interact with a digital creature.
2// We'll use React for the frontend, SQLite for data persistence, and custom emoji combinations for visuals.
3
4/** @jsxImportSource https://esm.sh/react */
5import React, { useEffect, useState } from "https://esm.sh/react";
6import { createRoot } from "https://esm.sh/react-dom/client";
7
8const EMOTIONS = {

KidsCodingDameDinoAdventuremain.tsx5 matches

@jbwinters•Updated 8 months ago
1/**
2 * This val implements a Dino Code Adventure game using React.
3 * It uses client-side React for the game logic and UI, and
4 * includes a server-side endpoint for storing high scores.
5 */
6/** @jsxImportSource https://esm.sh/react */
7import React, { useState, useEffect, useCallback } from "https://esm.sh/react";
8import { createRoot } from "https://esm.sh/react-dom/client";
9
10const GRID_SIZE = 5;

honoJsxHtmlTemplatesmain.tsx1 match

@yawnxyz•Updated 8 months ago
1/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
2import { renderToString } from "npm:react-dom/server";
3
4import { Hono } from 'npm:hono'

ForestryFinancialModelmain.tsx4 matches

@jbwinters•Updated 8 months ago
1// Interactive forestry financial model simulator.
2// It will use React for the UI, recharts for data visualization, and custom slider components.
3// The server will render the initial HTML, and the client-side JavaScript will handle the interactivity.
4
5/** @jsxImportSource https://esm.sh/react */
6import React, { useState } from "https://esm.sh/react";
7import { createRoot } from "https://esm.sh/react-dom/client";
8import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from "https://esm.sh/recharts";
9

pleasedLavenderAlbatrossmain.tsx19 matches

@ganeshkumartk•Updated 8 months ago
1// This approach creates a simple React component that embeds the MicroReact widget
2// and allows for customization of its parameters. The component will be rendered
3// on the client-side, and the server will return the HTML structure with the
4// necessary scripts.
5
6/** @jsxImportSource https://esm.sh/react */
7import React from "https://esm.sh/react";
8import { createRoot } from "https://esm.sh/react-dom/client";
9
10interface MicroReactProps {
11 id: string;
12 reactions?: string;
13 allowMultiple?: boolean;
14 textColor?: string;
18}
19
20function MicroReact({
21 id,
22 reactions = "12345",
23 allowMultiple = false,
24 textColor,
26 font,
27 api_base,
28}: MicroReactProps) {
29 const baseUrl = "https://microreact.glitch.me/embed/index.html";
30 const params = new URLSearchParams({
31 id,
32 reactions,
33 allowMultiple: allowMultiple ? "1" : "0",
34 });
48 frameBorder="none"
49 loading="lazy"
50 title="Leave a reaction"
51 />
52 </div>
57 return (
58 <div>
59 <h1>MicroReact Demo</h1>
60 <MicroReact id="demo-page" />
61 <p>This is a demo of the MicroReact widget. You can customize it by passing different props to the MicroReact component.</p>
62 <h2>Customized MicroReact</h2>
63 <MicroReact
64 id="custom-demo"
65 reactions="123"
66 allowMultiple={true}
67 textColor="#ff0000"
88 <html>
89 <head>
90 <title>MicroReact Demo</title>
91 <style>${css}</style>
92 </head>

AIDateInputmain.tsx3 matches

@ganeshkumartk•Updated 8 months ago
1/** @jsxImportSource npm:react */
2import { renderToString } from "npm:react-dom@18/server";
3import React from "npm:react@18";
4
5const clientScript = `

AIDateInputREADME.md2 matches

@ganeshkumartk•Updated 8 months ago
1# AI Date Input
2
3AI Date Input is a smart date detection React component. It uses natural language processing to interpret various date and time inputs, providing a seamless user experience for date entry.
4
5## Features
39## Dependencies
40
41- React 18
42- chrono-node (for date parsing)
43- Tailwind CSS (for styling)

policybuildermain.tsx2 matches

@avboy72•Updated 8 months ago
1/** @jsxImportSource npm:react **/
2import { renderToString } from "npm:react-dom@18/server";
3
4export default (req: Request) => {

reactHonoStarter4 file matches

@texoport•Updated 8 hours ago

new_website

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