Search

Results include substring matches and semantically similar vals. Learn more
eligosmlytics avatar
pageDetector
@eligosmlytics
@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";
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> {
devansh_bansal avatar
tenaciousCoffeeSpoonbill
@devansh_bansal
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
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() {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
nbbaier avatar
htmxCounterExample
@nbbaier
@jsxImportSource npm:hono/jsx
HTTP
/** @jsxImportSource npm:hono/jsx **/
import { renderToString } from "npm:react-dom/server";
import { Hono } from "npm:hono";
import type { FC, PropsWithChildren } from "npm:hono/jsx";
Azam123 avatar
ReminderApp
@Azam123
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
function App() {
<button onClick={() => toggleCompletion(reminder.id, reminder.completed)}>
↩️ Reactivate
</button>
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
jamiedubs avatar
bricklesGame
@jamiedubs
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useEffect, useRef, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/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> {
maxencelav avatar
datetimeFormatterTool
@maxencelav
@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";
import { format, parseISO } from "https://esm.sh/date-fns";
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
export default async function server(request: Request): Promise<Response> {
arthrod avatar
redBallComponent
@arthrod
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React from "https://esm.sh/react";
const pulseKeyframes = `
<title>Red Ball Component</title>
<script src="https://unpkg.com/react@17/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
animation: "pulse 2s infinite ease-in-out",
ReactDOM.render(<RedBall />, document.getElementById('root'));
</script>
sky_porie_fire443 avatar
deepLTranslatorApp
@sky_porie_fire443
@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";
function TranslationApp() {
marginBottom: "15px"
function client() {
createRoot(document.getElementById("root")).render(<TranslationApp />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
const translationResponse = await fetch(
`https://translate.googleapis.com/translate_a/single?client=gtx&sl=${source_lang === 'auto' ? 'auto' : source_lang}&t
method: 'GET',
pomdtr avatar
indie_auth
@pomdtr
@jsxImportSource npm:preact
Script
/** @jsxImportSource npm:preact **/
import { html } from "https://esm.town/v/stevekrouse/html?v=5";
import { render } from "npm:preact-render-to-string";
type HandlerFunc = (req?: Request) => Response | Promise<Response>;
export function indieauth(handler: HandlerFunc, params: {
clientID: string;
}): HandlerFunc {
</p>
<input type="hidden" name="client_id" value={params.clientID} />
<input type="hidden" name="redirect_uri" value={new URL("/redirect", params.clientID).toString()} />
<input type="hidden" name="state" value="jwiusuerujs" />
vprtwn avatar
svaltown
@vprtwn
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useEffect, useRef, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
interface WordEntry {
setIsTimerRunning(false);
const handleInput = (e: React.ChangeEvent<HTMLInputElement>) => {
const input = e.target.value;
fetchNewWords();
const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
if (e.key === "Tab") {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
export default async function server(request: Request): Promise<Response> {
Madhu3283 avatar
Goldcalculator
@Madhu3283
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import React, { useState, useEffect } from "https://esm.sh/react@18.2.0?deps=react@18.2.0,react-dom@18.2.0";
import ReactDOM from "https://esm.sh/react-dom@18.2.0?deps=react@18.2.0,react-dom@18.2.0";
// Custom Logo Component
</div>
function client() {
const rootElement = document.getElementById("root");
if (rootElement) {
ReactDOM.createRoot(rootElement).render(<GoldSellCalculator />);
if (typeof document !== "undefined") {
client();
export default async function server(request: Request): Promise<Response> {
reginafoley avatar
createFlashcardsVal
@reginafoley
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState, useEffect } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
import Papa from "https://esm.sh/papaparse@5.4.1";
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
export default async function server(request: Request): Promise<Response> {
stevekrouse avatar
welcomingPinkAlligator
@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, shaderErrorMessage?: 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${err
const completion = await client.chat.completions.create({
messages,
mikaello avatar
timeCalculator
@mikaello
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState, useEffect } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
function TimeInput({ value, onChange, placeholder }) {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
export default async function server(request: Request): Promise<Response> {
vawogbemi avatar
characterGuesser
@vawogbemi
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useEffect, useRef, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
startX = e.touches[0].clientX;
currentX = e.touches[0].clientX;
const endX = e.changedTouches[0].clientX;
function client() {
if (typeof document !== "undefined") { client(); }
const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
const completion = await client.chat.completions.create({