Search

Results include substring matches and semantically similar vals. Learn more
robbert_h avatar
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";
stevekrouse avatar
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(
tfayyaz avatar
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>
vip avatar
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> {
janpaul123 avatar
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 exi
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";
roysarajit143 avatar
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> {
willthereader avatar
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> {
saolsen avatar
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(
yieldray avatar
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";
gueejla avatar
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/focusForestA
/** @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> {
davidho123 avatar
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> {
janpaul123 avatar
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,
csl_ avatar
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> {
yawnxyz avatar
openAiExample
@yawnxyz
// Server-side rendering
HTTP
allowMethods: ['GET', 'POST'],
allowHeaders: ['Content-Type'],
// Server-side rendering
app.get("/", async (c) => {
const html = (
all avatar
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> {