design32x32bitmapmain.tsx10 matches
1/** @jsxImportSource https://esm.sh/react */
2import React, { useCallback, useEffect, useRef, useState } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
4import { adjectives, animals, colors, Config, uniqueNamesGenerator } from "https://esm.sh/unique-names-generator";
5231}, [settings.defaultName]);
232233const getPixelIndex = useCallback((event: React.MouseEvent | React.TouchEvent) => {
234const canvas = event.currentTarget as HTMLDivElement;
235const rect = canvas.getBoundingClientRect();
260}, [size, brushSize]);
261262const handleStart = useCallback((event: React.MouseEvent | React.TouchEvent) => {
263event.preventDefault();
264const { index, x, y } = getPixelIndex(event);
271}, [getPixelIndex, pixels, size]);
272273const handleMove = useCallback((event: React.MouseEvent | React.TouchEvent) => {
274event.preventDefault();
275if (isDrawing && startPositionRef.current) {
286}, [isDrawing, getPixelIndex, setPixel, isPainting]);
287288const handleEnd = useCallback((event: React.MouseEvent | React.TouchEvent) => {
289if (isDrawing && startPositionRef.current) {
290const { index } = getPixelIndex(event);
386"--border-color": colorScheme.border,
387"--shadow-color": colorScheme.shadow,
388} as React.CSSProperties}
389>
390<div className="retro-border">
435const root = createRoot(document.getElementById("root"));
436root.render(
437<React.StrictMode>
438<App />
439</React.StrictMode>,
440);
441} catch (error) {
calculateTransitTimeValmain.tsx3 matches
4// Results are saved and displayed for each new address added, with options to delete individual results.
56/** @jsxImportSource https://esm.sh/react */
7import React, { useEffect, useState } from "https://esm.sh/react";
8import { createRoot } from "https://esm.sh/react-dom/client";
910function App() {
WobbleShapesmain.tsx3 matches
1/** @jsxImportSource https://esm.sh/react */
2import React, { useState, useRef, useEffect } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
45function PotteryPlate({ radius, color, wobbliness, wobbleFrequency, wobbleIrregularity, rotation }) {
passwordGenmain.tsx3 matches
1/** @jsxImportSource https://esm.sh/react */
2import React, { useState, useEffect } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
45function App() {
routineTrackerAppREADME.md1 match
1# Routine Tracker
23This is a little React component to make our 7yo's after school routine self-serve so she can be a bit more independent after school.
45To change the items in the list, modify the `routineTasks` array of objects:
1/** @jsxImportSource https://esm.sh/react */
2import React, { useEffect, useState } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
45function App() {
10useEffect(() => {
11// Load the Spline component dynamically
12import("https://esm.sh/@splinetool/react-spline@2.2.6")
13.then((module) => {
14setSplineComponent(() => module.default);
linkInBioTemplatemain.tsx2 matches
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
34export default async function(req: Request) {
numbergamemain.tsx4 matches
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"
45// Game board size
45}
4647const handleTouchMove = (e: React.TouchEvent) => {
48if (!isDragging || !boardRef.current) return
49
recordWebsitePreparermain.tsx3 matches
1/** @jsxImportSource https://esm.sh/react */
2import React, { useState } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
45function App() {
1/** @jsxImportSource https://esm.sh/react */
2import React, { useEffect, useState } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
45function App() {