For static-site generators (Astro, Eleventy, …) or progressive
enhancement, import a server-safe renderToString helper
from reactolith/server:
The helper wraps the tree in AppProvider (or a custom one
passed via appProvider) and pipes it through
react-dom/server.renderToString. Router and Mercure side
effects are skipped because both rely on useEffect,
which React does not run during server rendering.