@arrow-js/hydrate
v1.0.0
Published
Hydration runtime for adopting ArrowJS SSR output in the browser.
Readme
@arrow-js/hydrate

ArrowJS is a tiny, type-safe reactive UI runtime built around JavaScript modules, template literals, and the DOM.
Docs · API Reference · Playground
What this package does
@arrow-js/hydrate adopts existing Arrow SSR HTML in the browser instead of replacing it.
It provides:
hydrate()to attach the client runtime to server-rendered markupreadPayload()to read the serialized SSR payload from the page
Use it together with @arrow-js/framework and @arrow-js/ssr in SSR applications.
Install
pnpm add @arrow-js/core @arrow-js/framework @arrow-js/ssr @arrow-js/hydrateExample
import { hydrate, readPayload } from '@arrow-js/hydrate'
import { App } from './App'
await hydrate(document.getElementById('app')!, App(), readPayload())