Search

1,917 code results for β€œreact client side”

Code
1,917

# React Hono Val Town Project Starter Template
TTP server, which serves the HTML, CSS, and JS, which run client-side.
template with other technologies choices (ie no Hono or no React), please create a new template
This template is a classic client-side-only React app.
This HTML file has a `<div id="root"></div>`, which is where we mount the React app.
ntrypoint** for all frontend JavaScript, including all the React. It is not a problem that it im
the **entrypoint** for frontend JavaScript. It imports the React app from `/frontend/components/
This directory is where the React components are stored. They're pretty standard client-side Rea
render the app, including HTML, JavaScript (including all client-side React), CSS, and even the
s or deployment platforms automatically make any content inside a `public/` folder public.
t that data on the frontend. This is a common pattern for client-side rendered apps.
kend/database/queries.ts`. This routes are called from the React app to refresh and update data.
Versions 0-17 of this val were done with Hono and server-rendering.
Versions 18+ were generated with Townie and use client-side React.
## Overview
nes job postings and real-time community chat, built using React and Val Town's serverless platf
## πŸ›  Technologies
- React (Frontend)
- Val Town (Hosting & Backend)
- Blob Storage (Data Persistence)
- Client-side & Server-side Rendering
Versions 0-17 of this val were done with Hono and server-rendering.
Versions 18+ were generated with Townie and use client-side React.
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import React, { useState } from "https://esm.sh/react@18.2.0";
function client() {
createRoot(document.getElementById("root")).render(<App />);
}
if (typeof document !== "undefined") { client(); }
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import React, { useState } from "https://esm.sh/react@18.2.0";
"Pretty please?",
"Are you sure? Side effects may include regret and reconsideration.",
"This is worse than running out of ibuprofen mid-shift.",
function client() {
createRoot(document.getElementById("root")).render(<App />);
}
if (typeof document !== "undefined") { client(); }
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import React, { useState } from "https://esm.sh/react@18.2.0";
"Pretty please?",
"Are you sure? Side effects may include regret and reconsideration.",
"This is worse than running out of ibuprofen mid-shift.",
function client() {
createRoot(document.getElementById("root")).render(<App />);
}
if (typeof document !== "undefined") { client(); }
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import React, { useState } from "https://esm.sh/react@18.2.0";
"What about a maybe..?",
"Please don't do this to me, pleaseee reconsider",
];
function client() {
createRoot(document.getElementById("root")).render(<App />);
}
if (typeof document !== "undefined") { client(); }
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import React, { useState } from "https://esm.sh/react@18.2.0";
"Even deep learning couldn't predict this heartbreak... 😭",
"Please reconsider, my loss function is at its minimum with you! πŸ“‰",
"Don't leave me stuck in a local minimum! 😒",
function client() {
createRoot(document.getElementById("root")).render(<App />);
}
if (typeof document !== "undefined") { client(); }
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import React, { useState } from "https://esm.sh/react@18.2.0";
"Im going to have to just kidnap you then",
"I wasnt joking , look outside ",
];
function client() {
createRoot(document.getElementById("root")).render(<App />);
}
if (typeof document !== "undefined") { client(); }
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import React, { useState } from "https://esm.sh/react@18.2.0";
"What do you mean no >:(",
"Last chance to reconsider >:(((",
"That's it I'm stealing your pc",
function client() {
createRoot(document.getElementById("root")).render(<App />);
}
if (typeof document !== "undefined") { client(); }
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import React, { useState } from "https://esm.sh/react@18.2.0";
from the moment i met you something inside me changed it was like my heart had been waiting for
function client() {
createRoot(document.getElementById("root")).render(<App />);
}
if (typeof document !== "undefined") { client(); }
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import React, { useState } from "https://esm.sh/react@18.2.0";
const NO_PHRASES = [
"Can’t you reconsider? πŸ’”πŸ₯Ί",
"Beers on me?? πŸ₯Ί",
function client() {
createRoot(document.getElementById("root")).render(<App />);
}
if (typeof document !== "undefined") { client(); }