Public API Cheatsheet

The complete public surface of reactolith:

import { App, // mount the app on a root element Router, // intercepts links/forms and visits URLs as HTML Mercure, // SSE client that pipes HTML updates into App.render MercureLive, // <mercure-live topic="…"> partial-update component ReactolithComponent, // converts a single DOM element into a React tree ScrollRestoration, // standalone scroll-restoration helper AppProvider, // default React provider used by App RouterProvider, // exposes useRouter() (loading, lastError, navigate) useApp, // hook → current App instance useRouter, // hook → { router, loading, lastError, clearError } useMercureTopic, // hook → live JSON value for a topic useMercureEventSource,// low-level hook (raw SSE messages) createLoader, // resolve tag names against import.meta.glob() maps } from "reactolith";

Form helpers

import { Form, useFormErrors, useFormSubmitting, } from "reactolith";

Server entry point

import { renderToString } from "reactolith/server";

CLI

npx generate-web-types --components src/components/ui --out web-types.json