1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, {
3 useState,
4 useEffect,
5 useCallback,
6 useMemo,
7} from "https://esm.sh/react@18.2.0";
8import { type Memory } from "../../shared/types.ts";
9import { ASSETS, SCENE_POSITIONS, SOURCE_TYPES } from "./assets.ts";
165 }, [fetchMemories]);
166
167 const handleAddMemory = async (e: React.FormEvent) => {
168 e.preventDefault();
169 if (!newMemoryText.trim()) return;
220 };
221
222 const handleUpdateMemory = async (e: React.FormEvent) => {
223 e.preventDefault();
224 if (!editingMemory || !editingMemory.text.trim()) return;
1# React Router Starter
2
3Minimal React Router starter example for Val Town
4
5[View demo][demo]
9The `http.tsx` file is the main server that responds with an HTML stream.
10The HTML includes a `<script type="module">` tag that loads the `client.tsx` file to hydrate the app
11with client-side routing provided by React Router's declarative mode.
12
13[demo]: https://jxnblk--82fd72a61fb411f0996a569c3dd06744.web.val.run
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, {
3 useState,
4 useEffect,
5 useCallback,
6 useMemo,
7} from "https://esm.sh/react@18.2.0";
8import { type Memory } from "../../shared/types.ts";
9
89 }, [fetchMemories]);
90
91 const handleAddMemory = async (e: React.FormEvent) => {
92 e.preventDefault();
93 if (!newMemoryText.trim()) return;
144 };
145
146 const handleUpdateMemory = async (e: React.FormEvent) => {
147 e.preventDefault();
148 if (!editingMemory || !editingMemory.text.trim()) return;
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, {
3 useState,
4 useEffect,
5 useCallback,
6 useMemo,
7} from "https://esm.sh/react@18.2.0";
8import { type Memory } from "../../shared/types.ts";
9import { ASSETS, SCENE_POSITIONS, SOURCE_TYPES } from "./assets.ts";
165 }, [fetchMemories]);
166
167 const handleAddMemory = async (e: React.FormEvent) => {
168 e.preventDefault();
169 if (!newMemoryText.trim()) return;
220 };
221
222 const handleUpdateMemory = async (e: React.FormEvent) => {
223 e.preventDefault();
224 if (!editingMemory || !editingMemory.text.trim()) return;
155- Current health goals and any medication reminders needed?
156
157Your goal is to collect this information naturally through conversation and store it as memories (as undated memories). Once you've gathered sufficient background information, you can conclude the intake process and transition to normal reactive chat.
158
159If the conversation is already past the intake stage, then analyze the message content and think about which memories might be worth creating based on the information provided.
1/** @jsxImportSource https://esm.sh/react@19.1.0 */
2import { createRoot } from "https://esm.sh/react-dom@19.1.0/client";
3import React from "https://esm.sh/react@19.1.0";
4import css from "https://esm.town/v/nbbaier/twitterCards/tweetCardCSS.ts";
5import type {
1/** @jsxImportSource https://esm.sh/react@19 */
2import fcsdk from "https://esm.sh/@farcaster/frame-sdk";
3import { ArrowUpRight, CircleX, ExternalLink, LoaderCircle, Store } from "https://esm.sh/lucide-react";
4import { NavLink, Route, Routes, useNavigate, useParams, useSearchParams } from "https://esm.sh/react-router@7";
5import { useEffect, useMemo, useRef, useState } from "https://esm.sh/react@19";
6
7import { Button, Input, Section, ShareButton } from "../components/ui.tsx";
28 {context && <ShareButton onClick={onShare} />}
29 </div>
30 {/* <div class="opacity-50">Hono + React + Tailwind + Farcaster Mini App Starter Project on Val Town</div> */}
31
32 <MiniApps />
5 */
6
7/** @jsxImportSource https://esm.sh/preact */
8import chroma from "npm:chroma-js";
9import { render } from "npm:preact-render-to-string";
10
11const R = 128;
2 * This is a super juicy "Hello World" val for Val Town.
3 * It creates an interactive, animated HTML page with a greeting message.
4 * The page includes a client-side React component with juicy interactions.
5 */
6/** @jsxImportSource https://esm.sh/react */
7import React, { useState, useEffect } from "https://esm.sh/react";
8import { createRoot } from "https://esm.sh/react-dom/client";
9
10/**
2 * This program implements a simple Wave Function Collapse algorithm to generate
3 * a random game world rendered in ASCII characters with different colors.
4 * It uses React for the client-side rendering and handles the generation
5 * on the server-side.
6 */
7
8/** @jsxImportSource https://esm.sh/react */
9import React, { useState, useEffect } from "https://esm.sh/react";
10import { createRoot } from "https://esm.sh/react-dom/client";
11
12// Define tile types and their constraints