Search
youtubeSearchApp
@Pruthvi123
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import React, { useState } from "https://esm.sh/react@18.2.0";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
function App() {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
MandelbrotFractalApp
@madaju
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState, useRef, useEffect } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
function MandelbrotFractal() {
return <MandelbrotFractal />;
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
valle_tmp_92279722423458817448513814852015
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import valleGetValsContextWindow from "https://esm.town/v/janpaul123/valleGetValsContextWindow";
import { passwordAuth } from "https://esm.town/v/pomdtr/password_auth?v=84";
import _ from "npm:lodash@4";
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
const vt = new ValTown({ bearerToken: Deno.env.get("valtown") });
const username = "janpaul123";
properIvoryPike
@CoachCompanion
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import React, { useState, useEffect, useRef } from "https://esm.sh/react@18.2.0";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import { marked } from "https://esm.sh/marked@4.3.0";
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
sweetBonanzaGame
@aa370166fasd
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
const SYMBOLS = [
</div>
function client() {
createRoot(document.getElementById("root")).render(<SlotMachine />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request) {
cekdatatruck
@nirwan
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import { Html5QrcodeScanner } from "https://esm.sh/html5-qrcode";
import React, { useEffect, useRef, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
const companies = [
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
snake_game
@mahictn
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import React, { useState, useEffect, useCallback } from "https://esm.sh/react@18.2.0";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
const GRID_SIZE = 20;
</div>
function client() {
createRoot(document.getElementById("root")).render(<SnakeGame />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
agileGrayGerbil
@stevekrouse
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import Cerebras from "https://esm.sh/@cerebras/cerebras_cloud_sdk";
import React, { useState, useEffect, useRef, useCallback } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
function debounce(func: Function, wait: number) {
setRetryCount(prevCount => prevCount + 1);
handleSubmit(new Event('submit') as React.FormEvent, error.message);
} else {
}, [code, debouncedRenderShader, retryCount]);
async function handleSubmit(e: React.FormEvent, errorMessage?: string) {
if (e) e.preventDefault();
</div>
function client() {
createRoot(document.getElementById("root")!).render(<App />);
if (typeof document !== "undefined") {
client();
function renderShader(canvas: HTMLCanvasElement, fragmentShaderSource: string, time: number) {
if (req.method === "POST") {
const client = new Cerebras();
const { prompt, currentCode, errorMessage } = await req.json();
messages.push({ role: "user", content: `The previous shader code resulted in the following error. Please fix it:\n${errorMessage}` });
const completion = await client.chat.completions.create({
messages,
pushFrontend
@jrmann100
An interactive, runnable TypeScript val by jrmann100
Script
return;
let clientSubscription = await registration.pushManager.getSubscription();
let serverSubscription = await (await fetch("/subscription")).json();
if (clientSubscription === null) {
if (serverSubscription !== null) {
status.textContent = "Server was reset.";
clientSubscription.unsubscribe();
clientSubscription = null;
button.textContent = "Subscribe";
} else if (
clientSubscription?.toJSON().keys.p256dh === serverSubscription
status.textContent = "This device is subscribed to notifications.";
status.textContent = "Another device is currently receiving notifications.";
clientSubscription.unsubscribe();
clientSubscription = null;
button.textContent = "Subscribe";
body: JSON.stringify(
clientSubscription
? (await clientSubscription.unsubscribe(), null)
: await registration.pushManager.subscribe({
dailyScheduleTracker
@vandermerwed
Daily Schedule & Chores Tracker A flexible and interactive analogue clock schedule and chore tracker designed for my 8-year-old. This React component helps manage daily routines and tasks, featuring a visually appealing clock interface and a dynamic chore list. Features Analogue Clock Schedule: Displays daily activities in an analogue clock format with segments representing different time slots. Chore Tracker: Lists chores for the day, with checkboxes for completion tracking. Customizable: Accepts schedule and todoList props, allowing dynamic data from APIs or other sources. Real-time Updates: The clock updates every second to show the current time. Responsive Design: Styled with Tailwind CSS for a modern and clean appearance. Installation To use the component, include it in your React project and provide the necessary props. import AnalogueScheduleClock from './path-to-component';
// Example usage
<AnalogueScheduleClock
schedule={yourScheduleArray}
todoList={yourTodoListArray}
todoListHeading="Chores"
legendHeading="Today's Schedule"
initialTime={new Date()}
isLoading={false}
/> Props | Prop | Type | Description |
|------------------|------------------------|-----------------------------------------------------------------------------|
| schedule | ScheduleItem[] | Array of schedule items with start , end , label , and color properties. Defaults to a preset schedule. |
| todoList | TaskItem[] | Array of chores with id , name , and completed status. Defaults to a preset chore list. |
| todoListHeading | string | Heading for the chore list section. Default is "Kid's Chores" . |
| legendHeading | string | Heading for the schedule legend section. Default is "Daily Schedule" . |
| initialTime | Date | Initial time to display on the clock. Defaults to the current time. |
| isLoading | boolean | Displays a loading screen if set to true . Default is false . | Customizing the Schedule You can update the default schedule by modifying the defaultSchedule array or passing a custom schedule prop: const defaultSchedule: ScheduleItem[] = [
{ label: "💤", start: "19:00", end: "06:00", color: "#fca5a5" },
{ label: "🍳", start: "06:00", end: "07:15", color: "#93c5fd" },
{ label: "🚗", start: "07:15", end: "07:30", color: "#d1d5db" },
{ label: "🏫", start: "07:30", end: "12:45", color: "#fdba74" },
{ label: "🚗", start: "12:45", end: "13:00", color: "#d1d5db" },
{ label: "📺", start: "13:00", end: "14:00", color: "#86efac" },
{ label: "📚", start: "14:00", end: "16:00", color: "#fdba74" },
{ label: "🎮", start: "16:00", end: "17:00", color: "#86efac" },
{ label: "🍽️", start: "17:00", end: "18:00", color: "#93c5fd" },
{ label: "🛁", start: "18:00", end: "19:00", color: "#d8b4fe" },
]; Feel free to customize the labels, start/end times, and colors to suit your child's daily routine. Customizing the Chore List To update the chores, modify the efaultTodoList array or provide a custom todoList prop: const defaultTodoList: TaskItem[] = [
{ id: "1", name: "Make bed", completed: false },
{ id: "2", name: "Clean room", completed: false },
{ id: "3", name: "Do homework", completed: false },
{ id: "4", name: "Feed pet", completed: false },
{ id: "5", name: "Set table", completed: false },
]; You can add, remove, or modify tasks to match your child’s responsibilities. Changing Headings To change the headings for the chores and schedule sections, update lines 229 and 230 in the code: todoListHeading = "Kid's Chores",
legendHeading = "Daily Schedule", Adjust these to fit your preferred labels or language.
HTTP
A flexible and interactive analogue clock schedule and chore tracker designed for my 8-year-old. This React component helps manage daily routines and tasks, featuring a visually appealing clock interface and a dynamic chore list.
To use the component, include it in your React project and provide the necessary props.
/** @jsxImportSource https://esm.sh/react */
import React, { useEffect, useMemo, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
const ScheduleSegment: React.FC<{
const ClockHand: React.FC<{ angle: number; length: number; width: number; color: string }> = (
const Legend: React.FC<{ schedule: ScheduleItem[]; currentTime: Date; heading: string }> = (
const TodoList: React.FC<{ todos: TaskItem[]; heading: string }> = ({ todos, heading }) => {
function client() {
client();
webpage_summarizer
@spinningideas
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { ClipboardDocumentCheckIcon } from "https://esm.sh/@heroicons/react/24/outline";
import { ClipboardIcon, MoonIcon, SunIcon, XMarkIcon } from "https://esm.sh/@heroicons/react/24/solid";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
function App() {
}, [isDarkMode]);
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
crossmintSolanaTxGenerator
@alfongj
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useEffect, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
import ReactMarkdown from "https://esm.sh/react-markdown";
import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter";
import { vscDarkPlus } from "https://esm.sh/react-syntax-highlighter/dist/esm/styles/prism";
const handleLanguageChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
const handleSubmit = async (e: React.FormEvent) => {
<ReactMarkdown
function client() {
valle_tmp_02267091431922629935130311039563566
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import valleGetValsContextWindow from "https://esm.town/v/janpaul123/valleGetValsContextWindow";
import { updateValByName } from "https://esm.town/v/nbbaier/updateValByName?v=14";
import _ from "npm:lodash@4";
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
const vt = new ValTown({ bearerToken: Deno.env.get("valtown") });
const username = "janpaul123";
virtualPetSim
@muhammad_owais_warsi
// This app will create a virtual pet simulation game where users can adopt, care for, and interact with a digital creature.
HTTP
// This app will create a virtual pet simulation game where users can adopt, care for, and interact with a digital creature.
// We'll use React for the frontend, SQLite for data persistence, and custom emoji combinations for visuals.
/** @jsxImportSource https://esm.sh/react */
import React, { useEffect, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
const EMOTIONS = {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
async function server(request: Request): Promise<Response> {
billiardCafeApp
@Kpool
@jsxImportSource https://esm.sh/react@18.2.0
Cron
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import React, { useCallback, useEffect, useMemo, useRef, useState } from "https://esm.sh/react@18.2.0";
function client() {
if (typeof document !== "undefined") { client(); }
"react": "https://esm.sh/react@18.2.0",
"react-dom": "https://esm.sh/react-dom@18.2.0",
"react-dom/client": "https://esm.sh/react-dom@18.2.0/client"
import React from 'react';
import { createRoot } from 'react-dom/client';