Search
smartCrimsonBedbug
@GideonEsq
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import React, { useState, useRef } from "https://esm.sh/react@18.2.0";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
// Enhanced Email Designer Component
preactExample
@maxm
@jsxImportSource https://esm.sh/preact
HTTP
/** @jsxImportSource https://esm.sh/preact */
import { render } from "npm:preact-render-to-string";
export const preactExample = () =>
new Response(render(<div>Test {1 + 1}</div>), {
linkInBioTemplate
@trantion
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import { renderToString } from "npm:react-dom/server";
export default async function(req: Request) {
return new Response(
snake
@jxnblk
// WIP turn-based snake game built in Val Town
HTTP
// WIP turn-based snake game built in Val Town
/** @jsxImportSource npm:preact */
import { render } from "npm:preact-render-to-string";
import prng from "npm:pure-rand";
type V2 = [number, number];
aiVideoApp
@Priyansh
@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";
// Updated Types for Video Social Media Platform
recommendedDuration: 30
const handleVideoUpload = (event: React.ChangeEvent<HTMLInputElement>) => {
const file = event.target.files?.[0];
</div>
function client() {
createRoot(document.getElementById("root")).render(<AIVideoApp />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
HelloWorld
@NaN
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react **/
import { renderToString } from "https://esm.sh/react-dom@18/server";
export default (req: Request) => {
return new Response(
leadership_styles_inventory
@jaredsilver
@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";
const leadershipStyles = [
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
export default async function server(request: Request): Promise<Response> {

blobbyFace
@yawnxyz
(todo) This lists all your blobs. You can create new blobs, edit them, or even preview (and upload) file blobs from both URL and computer!
HTTP
updated: false,
this.blobs[this.name] = newBlob;
// not creating this on server causes annoying side effects
await this.updateCreate(this.name);
// await this.loadBlob(this.name);
loanCalculatorPKR
@Aagharalig10
@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 LoanCalculator() {
</div>
function client() {
createRoot(document.getElementById("root")).render(<LoanCalculator />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
tldrawReactExportScript
@tfayyaz
@jsxImportSource https://esm.sh/react@18.2.0
Script
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { useState } from "https://esm.sh/react@18.2.0";
import { Tldraw } from "https://esm.sh/tldraw@2.1.0";
export function MyApp() {
valle_tmp_56208884983514818093201845315532
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import valleGetValsContextWindow from "https://esm.town/v/janpaul123/valleGetValsContextWindow";
import archiveVal from "https://esm.town/v/nbbaier/archiveVal?v=10";
import _ from "npm:lodash@4";
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
// Set these to your own
const username = "janpaul123";
DailyDaughterNotes
@heathergliffin
* This app generates cute daily notes for a daughter using OpenAI's GPT model.
* It stores the generated notes in SQLite for persistence and displays them on a simple web interface.
* The app uses React for the frontend and Deno's runtime environment in Val Town for the backend.
HTTP
* It stores the generated notes in SQLite for persistence and displays them on a simple web interface.
* The app uses React for the frontend and Deno's runtime environment in Val Town for the backend.
/** @jsxImportSource https://esm.sh/react */
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> {
multirouteHTML
@iamseeley
π Personal Website with Server-Side Active Navigation
HTTP
π Personal Website with Server-Side Active Navigation
* @title Personal Website with Server-Side Active Navigation
* @description Create a personal portfolio website with multiple pages and server-side active navigation using an HTTP Val.
import { websiteStyles } from "https://esm.town/v/iamseeley/websiteStyles";
<p>${personalData.summary}</p>
<p><strong>This website is rendered server-side with pure HTML.</strong></p>
<p>Check out the <a href='https://www.val.town/v/iamseeley/multirouteHTML'>source</a> and start building your own site!</p>
valleCodemirror
@janpaul123
// const ret = await build({
Script
target: ts.ScriptTarget.ESNext,
module: ts.ModuleKind.ESNext,
jsx: ts.JsxEmit.React,
lib: ["esnext", "dom"],
moduleDetection: ModuleDetectionKind.Force,
fullWebsiteChecker
@willthereader
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import * as cheerio from "https://esm.sh/cheerio";
import React, { useEffect, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
console.log("Version: " + import.meta.url.match(/[?&]v=([^&]*)/)?.at(1));
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
let currentProgress = null;