reactExamplemain.tsx4 matches
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
34function HelloWorld() {
26}
2728function reactExample(request: Request) {
29const renderedString = renderToString(<Html content={<HelloWorld />} />);
3038}
3940export default reactExample;
1/** @jsxImportSource https://esm.sh/react */
23import fal from "npm:@fal-ai/serverless-client";
4import { renderToString } from "npm:react-dom/server";
56export default async function(interval: Interval) {
stevekrouse_minimalmain.tsx3 matches
1/** @jsxImportSource https://esm.sh/react */
2import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=46";
3import { email } from "https://esm.town/v/std/email?v=11";
4import { sqlite } from "https://esm.town/v/std/sqlite";
5import tailwindURL from "https://esm.town/v/stevekrouse/tailwindURL";
6import { renderToString } from "npm:react-dom/server";
78const linkClass = "text-blue-500 hover:underline";
19}
2021export const reactExample = modifyFetchHandler(async (request: Request) => {
22const url = new URL(request.url);
23if (url.pathname === "/favicon.ico") return new Response(null, { status: 404 });
preact_test_componentmain.tsx2 matches
1/** @jsxImportSource https://esm.sh/preact **/
23import register from "https://esm.sh/preact-custom-element";
45const Greeting = ({ name = "World" }) => <p>Hello, {name}!</p>;
example_ssrmain.tsx3 matches
1/** @jsxImportSource https://esm.sh/react */
2import { useEffect, useState } from "https://esm.sh/react";
34// will run on both client and server
35// server-side import should only be used here
36const { Island } = await import("https://esm.town/v/pomdtr/island");
37const { renderToString } = await import("https://esm.sh/react-dom/server");
38return new Response(
39renderToString(
hydrate_islandsmain.tsx2 matches
1const islands = Array.from(document.querySelectorAll("[data-hydration-src]"));
2if (islands.length > 0) {
3const { hydrateRoot } = await import("https://esm.sh/react-dom@18.2.0/client");
4const { jsx: _jsx } = await import("https://esm.sh/react@18.2.0/jsx-runtime");
5for (const island of islands) {
6let src = island.getAttribute("data-hydration-src");
1/** @jsxImportSource https://esm.sh/react */
23import React from "https://esm.sh/react";
45export function Island({
12children: any;
13}) {
14const child = React.Children.only(children);
1516return (
hydrate_islandmain.tsx2 matches
4}
56const { hydrateRoot } = await import("https://esm.sh/react-dom@18.2.0/client");
7const { jsx: _jsx } = await import("https://esm.sh/react@18.2.0/jsx-runtime");
8const src = island.getAttribute("data-hydration-src");
9console.log(`hydrating ${src}`);
testWebsitemain.tsx2 matches
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from 'npm:react-dom/server';
34export const testWebsite = (request: Request) => {
testWebsitemain.tsx2 matches
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from 'npm:react-dom/server';
34export const testWebsite = (request: Request) => {