templateModalTestmain.tsx2 matches
40<path stroke-linecap="round" stroke-linejoin="round" d="M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"></path>
41</svg>
42<div class="font-semibold group-hover:text-black">ReactJS</div>
43</button>
44<button class="group bg-gray-50 border-gray-300 flex items-center gap-2 overflow-hidden rounded border p-3 text-left transition-colors hover:border-blue-500 hover:shadow-md">
52<path stroke-linecap="round" stroke-linejoin="round" d="M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"></path>
53</svg>
54<div class="font-semibold group-hover:text-black">Preact</div>
55</button>
56<button class="group bg-gray-50 border-gray-300 flex items-center gap-2 overflow-hidden rounded border p-3 text-left transition-colors hover:border-blue-500 hover:shadow-md">
freshChartsExamplemain.tsx5 matches
1/** @jsxImportSource https://esm.sh/react */
2import React from "https://esm.sh/react";
34// fresh_charts expects React to be available on globalThis/window, not sure why!
5globalThis.React = React;
6import { Chart, renderChart } from "https://deno.land/x/fresh_charts/mod.ts";
7import { ChartColors, transparentize } from "https://deno.land/x/fresh_charts/utils.ts";
8import { renderToString } from "npm:react-dom/server";
910const chart = () => ({
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
34export default async function(req: Request) {
preactExamplemain.tsx4 matches
1/** @jsxImportSource https://esm.sh/preact */
2import ImportCar from "https://esm.town/v/tfayyaz/reactImportCar";
3import { render } from "npm:preact-render-to-string";
45function Car(props) {
19}
2021export const preactExample = (request: Request) =>
22new Response(render(<Garage />), {
23headers: {
valTownAnalyticsmain.tsx2 matches
1/** @jsxImportSource https://esm.sh/react */
2import { DateTime } from "https://cdn.skypack.dev/luxon@2.3.2";
3import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
4import { sqlite } from "https://esm.town/v/std/sqlite?v=6";
5import { renderToString } from "npm:react-dom/server";
67const { author, name, httpEndpoint } = extractValInfo(import.meta.url);
generativeNoisemain.tsx2 matches
1/** @jsxImportSource npm:react **/
2import Alea from "npm:alea";
3import { renderToString } from "npm:react-dom@18/server";
4import { createNoise2D } from "npm:simplex-noise";
5
tomatoSpiderREADME.md6 matches
1# Client Side React Helper
23## Example Usage
45```tsx
6/** @jsxImportSource https://esm.sh/react */
7import react_http from "https://esm.town/v/stevekrouse/react_http?v=6";
8import { useState } from "https://esm.sh/react@18.2.0";
910export function App() {
17}
1819export default () => react_http({
20component: App,
21sourceURL: import.meta.url,
31#### Only use https imports
3233The val with your React component will be imported in the browser. Thus, only use `https` imports in this val and any that it imports. Replace any `npm:` with `https://esm.sh/` and everything should work great.
tomatoSpidermain.tsx2 matches
6<script type="module">
7import { ${component.name} } from "${sourceURL}";
8import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
9import { jsx } from "https://esm.sh/react@18.2.0/jsx-runtime";
10createRoot(document.body).render(jsx(${component.name}, {}));
11</script>
1// JSX can be used in the client val thanks to this magic comment
2/** @jsxImportSource https://esm.sh/react **/
3// Make sure to only import from esm.sh (npm: specifier are not supported in the browser)
4import { GGMLQuantizationType, gguf } from "https://esm.sh/@huggingface/gguf";
5import React from "https://esm.sh/react";
6import ReactDOM from "https://esm.sh/react-dom";
7import { ObjectInspector } from "https://esm.sh/react-inspector";
89async function fetchGgufMetadata(url: string) {
1314function Counter() {
15const [counter, setCounter] = React.useState(0);
1617return (
29return (
30<>
31<h1>React Example</h1>
32<Counter />
33</>
3637// The app will be rendered inside the root div
38const root = ReactDOM.createRoot(document.getElementById("root"));
39root.render(<App />);
bloomingButtonREADME.md2 matches
89```tsx
10/** @jsxImportSource https://esm.sh/react */
11import { renderToString } from "npm:react-dom/server";
1213export default async function(req: Request): Promise<Response> {