@terajs/renderer-ssr
v1.0.5
Published
Server-side rendering package for Terajs.
Readme
@terajs/renderer-ssr
Server-side rendering package for Terajs.
Provides string and stream rendering helpers plus route execution helpers for SSR workflows.
Most applications meet this surface through framework or server integration layers. Use it directly when you are composing SSR around Terajs route modules and runtime hydration payloads.
Install
npm install @terajs/renderer-ssrCore APIs
renderToString(component, context)renderToStream(component, context)executeServerRoute(options)
SSR context and result types
Important public types include:
SSRContextSSRHydrationHintSSRResultExecuteServerRouteOptionsExecuteServerRouteResultSSRRouteModule
SSRContext and SSRResult can carry:
metaroute- optional
ai - serialized resources
- route hydration snapshots
- loader data
Notes
- Pair with
@terajs/routerfor route definitions and route loading contracts. - Pair with
@terajs/renderer-webfor client hydration. - Keep request/response transport logic in adapter layers where possible.
