Search
MultiImageCompressor
@robbert_h
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import React from "https://esm.sh/react@18.2.0";
import ReactDOM from "https://esm.sh/react-dom@18.2.0/client";
const [files, setFiles] = React.useState<CompressedFile[]>([]);
const [isDragging, setIsDragging] = React.useState(false);
const [isDownloadingAll, setIsDownloadingAll] = React.useState(false);
const [totalCompressedPhotos, setTotalCompressedPhotos] = React.useState(0);
const [error, setError] = React.useState<Error | null>(null);
React.useEffect(() => {
import React from "https://esm.sh/react@18.2.0";
remarkDemoJSX
@stevekrouse
@jsxImportSource https://esm.sh/preact
HTTP
/** @jsxImportSource https://esm.sh/preact */
import { render } from "npm:preact-render-to-string";
export const remarkDemoJSX = async (req: Request) =>
new Response(
react_http
@tfayyaz
An interactive, runnable TypeScript val by tfayyaz
Script
<script type="module">
import { ${component.name} } from "${url}"
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import { jsx } from "https://esm.sh/react@18.2.0/jsx-runtime";
createRoot(document.body).render(jsx(App, {}));
</script>
rss_feed_ai_analysis
@vip
@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 { marked } from "https://esm.sh/marked";
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
export default async function server(request: Request): Promise<Response> {
valle_tmp_2671404837576818506367901100203444
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP
Sure, I'll focus on cleaning up some repeated code, improve code readability, and add some enhancements while keeping the existing functionality intact. Here's the improved version:
ts
/** @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";
sipCalculator
@roysarajit143
@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 SIPCalculator() {
</div>
function client() {
createRoot(document.getElementById("root")).render(<SIPCalculator />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
DeleteExtraText
@willthereader
@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";
// You need to remove all instances of the word New then it'll remove the date and word count so it's easier
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
testCodemirrorTsBrowserEmacs
@saolsen
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import { renderToString } from "npm:react-dom/server";
export default async function(req: Request): Promise<Response> {
return new Response(
translate
@yieldray
Translator using a public deepl api
HTTP
<script src="https://cdn.tailwindcss.com/"></script>
<script type="module">
import { html, Component, render } from "https://cdn.cbd.int/htm/preact/standalone.module.js";
import { ofetch } from "https://esm.sh/ofetch/dist/index.mjs";
import { z } from "https://esm.sh/zod";
squareroot
@gueejla
Get the square root of any number! React formatting borrowed from https://www.val.town/v/jdan/infoboxCrawler and https://www.val.town/v/roramigator/focusForestApp
HTTP
Get the square root of any number!
React formatting borrowed from https://www.val.town/v/jdan/infoboxCrawler and https://www.val.town/v/roramigator/focusForestApp
/** @jsxImportSource https://esm.sh/react */
import React, { useEffect, useRef, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=51";
const canvasRef = sqrtNum ? showMath(inputNum, sqrtNum) : null;
// Render website with React
return (
ctx.stroke();
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
function server(req: Request): Promise<Response> {
compassionateFuchsiaXerinae
@davidho123
@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> {
valledrawclient
@janpaul123
@jsxImportSource https://esm.sh/react@18.3.1
Script
/** @jsxImportSource https://esm.sh/react@18.3.1 **/
// "react-dom": "18.3.1",
// "react": "18.3.1",
// "@reecelucas/react-use-hotkeys": "2.0.0",
// export * as ReactDOM from "react-dom";
// export * as React from "react";
// import useHotkeys from "@reecelucas/react-use-hotkeys";
window.makeValleDrawClient({
(window as any).makeValleDrawClient = async function({ iframeSrc, model }) {
ReactDOM,
dndoodle
@csl_
DNDoodle My DND group has used doodle for ages to schedule our sessions, but it never really worked that great for us. We just didn't need that many features. This was my very first val and honestly, I couldn't be happier with it.
HTTP
* and is displayed differently in the results view.
* The app uses React for the frontend and SQLite for data persistence.
* It features improved styling, interactive elements, and email functionality.
/** @jsxImportSource https://esm.sh/react */
import { addDays, format, parse } from "https://esm.sh/date-fns";
import React, { useEffect, 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(); }
async function server(request: Request): Promise<Response> {
openAiExample
@yawnxyz
// Server-side rendering
HTTP
allowMethods: ['GET', 'POST'],
allowHeaders: ['Content-Type'],
// Server-side rendering
app.get("/", async (c) => {
const html = (
allFont
@all
@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 popularCombos = [
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {