1/** @jsxImportSource https://esm.sh/react */
2import OpenAI from "npm:openai";
3import { renderToString } from "npm:react-dom/server";
4
5// This uses by personal API key, you'll need to provide your own if
1/** @jsxImportSource https://esm.sh/react */
2import { Hono } from "npm:hono@3";
3import OpenAI from "npm:openai";
4import { renderToString } from "npm:react-dom/server";
5
6const jsxResponse = (jsx) => {
1/** @jsx jsx **/
2import { renderToString } from "npm:react-dom/server";
3import { jsx } from "https://deno.land/x/hono@v3.11.7/middleware.ts";
4import { Hono } from "https://deno.land/x/hono@v3.11.7/mod.ts";
1/** @jsxImportSource https://esm.sh/react */
2
3export function SparklineSVG({ strokeWidth, data, height, width, fill, stroke }) {
2- Hono serves the frameworks, API calls, and functions
3- htmx handles ajax requests, and can very powerfully request html and other content to swap out the front-end
4- alpine handles app-like reactivity without having to always resort to server round trips
5
6Migrated from folder: Utils/ai/examples/aiHonoHtmxAlpineStreamingExample
1Migrated from folder: Archive/sparklineSVGReact
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
3
4import valTownBadge from "https://esm.town/v/jxnblk/valTownBadge?v=16";
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
3
4export default async function(req: Request) {
1/** @jsxImportSource npm:hono@3/jsx */
2import { handler } from "https://esm.town/v/pomdtr/ssr";
3import date_me_faq from "https://esm.town/v/stevekrouse/dateme_faq_react";
4import Layout from "https://esm.town/v/stevekrouse/dateme_layout";
5
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import {
3 NavLink,
4 Outlet,
5 useNavigation,
6} from "https://esm.sh/react-router-dom@6.23.0?deps=react@18.2.0,react-dom@18.2.0";
7
8const tabs = { "/": "Home", "/browse": "Browse", "/faq": "FAQ" };
Starter template with client-side React & Hono server
A web-based dice roller using React on Val Town
Write business logic with ease
Meet the new standard for modern TypeScript development.
Type-safe, reactive, framework-agnostic library to manage your business logic.
Follow me if you learn more about JavaScript | TypeScript | React.js | Next.js | Linux | NixOS | Frontend Developer | https://linktr.ee/officialrajdeepsingh