Search
addToLog
@ejfox
* This chat application allows users to post messages and view a log of all messages.
* It uses SQLite for persistence and React for the frontend.
* The server handles message posting and retrieval, while the client renders the UI.
HTTP
* This chat application allows users to post messages and view a log of all messages.
* It uses SQLite for persistence and React for the frontend.
* The server handles message posting and retrieval, while the client renders the UI.
/** @jsxImportSource https://esm.sh/react */
import React, { useState, useEffect } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
interface Message {
setMessages(data);
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
</div>
function client() {
createRoot(document.getElementById("root")!).render(<App />);
if (typeof document !== "undefined") {
client();
async function server(request: Request): Promise<Response> {
cerebras_debater
@stevekrouse
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useEffect, useRef, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
const PRESET_DEBATES = [
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
export default async function server(req: Request): Promise<Response> {
const { Cerebras } = await import("https://esm.sh/@cerebras/cerebras_cloud_sdk");
const client = new Cerebras();
if (url.searchParams.has("nextMessage")) {
const currentPersonality = currentSpeaker === 1 ? personality1 : personality2;
const response = await client.chat.completions.create({
messages: [
steadfastCrimsonAlligator
@rudd
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState, useEffect, useRef } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
function App() {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
Chatprincipal
@arthrod
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useEffect, useRef, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
import styled, { createGlobalStyle, keyframes } from "https://esm.sh/styled-components";
function App() {
const [isNavOpen, setIsNavOpen] = React.useState(false);
const toggleNav = () => {
</Footer>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
embedVideoWebPage
@eligosmlytics
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState, useEffect } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
function App() {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
chronoGen
@all
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState, useEffect, useRef } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
// Mock chromospace module
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
hono_react_ssr
@stevekrouse
Hono React SSR Development in progress
Script
# Hono React SSR
/** @jsxImportSource https://esm.sh/react */
import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
import { useEffect, useState } from "https://esm.sh/react@18.2.0";
// button that's disabled until client react hydrates
const [clientHydrated, setClientHydrated] = useState(false);
useEffect(() => setClientHydrated(true), []);
return <button disabled={!clientHydrated} {...props}></button>;
const [clientHydrated, setClientHydrated] = useState(false);
useEffect(() => setClientHydrated(true), []);
disabled={!clientHydrated}
BestTime2post
@taurusismagic
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import React, { useState, useEffect, useMemo, useCallback } from "https://esm.sh/react@18.2.0";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
const PLATFORMS = [
console.error("Root element not found");
function client() {
if (document.readyState === "loading") {
if (typeof document !== "undefined") {
client();
export default async function server(request: Request): Promise<Response> {
truthfulAmethystParakeet
@stevekrouse
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter";
import { tomorrow } from "https://esm.sh/react-syntax-highlighter/dist/esm/styles/prism";
async function handleSubmit(e: React.FormEvent) {
function client() {
client();
const client = new Cerebras();
const completion = await client.chat.completions.create({
jsonVisualizerApp
@nbbaier
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
import { Light as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter";
import json from "https://esm.sh/react-syntax-highlighter/dist/esm/languages/hljs/json";
import { docco } from "https://esm.sh/react-syntax-highlighter/dist/esm/styles/hljs";
SyntaxHighlighter.registerLanguage('json', json);
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
eventsInNYC
@vawogbemi
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
function EventSubmissionForm({ onSubmit }) {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
cooperativeBronzeWildcat
@stevekrouse
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter";
import { tomorrow } from "https://esm.sh/react-syntax-highlighter/dist/esm/styles/prism";
async function handleSubmit(e: React.FormEvent) {
function client() {
client();
const client = new Cerebras();
const completion = await client.chat.completions.create({
LandscapeLightingTool
@chet
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
const insulationThickness = {
return <LightingCalculator />;
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
perseveringApricotSwordfish
@stevekrouse
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter";
import { tomorrow } from "https://esm.sh/react-syntax-highlighter/dist/esm/styles/prism";
async function handleSubmit(e: React.FormEvent) {
function client() {
client();
const client = new Cerebras();
const completion = await client.chat.completions.create({
smsjournalerregistration
@cephalization
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
const relayURL = "https://cephalization-smsjournalertextrelay.web.val.run";
const [message, setMessage] = useState("");
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
async function server(request: Request): Promise<Response> {