npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@exactjs/ssr

v0.7.1

Published

Server rendering and server-runtime composition for eXact applications.

Downloads

2,578

Readme

@exactjs/ssr

Server rendering and server-runtime composition for eXact applications.

Usage

import { renderToString } from '@exactjs/ssr';

const html = await renderToString(<App />);

Rendering modes

renderToString() and renderToHydratableString() return promises. Both use the same rendering engine as streaming and progressive documents. Available component work runs immediately; rendering waits only when required tasks or child output are pending. Await the result before reading its HTML.

Node hosts use createNodeHandler() for custom pages or createExactNodeHandler() for framework endpoints. Native Bun hosts use the Bun adapter. These handlers automatically trial scheduling under load and keep quiet requests immediate. Forward the handler's request signal to SSR so render entry and pending component data reuse the same adaptive policy. Ready components and transport drains do not add checkpoints.

Custom hosts can provide scheduleRender(signal): return void to continue immediately or a promise to defer rendering. The hook also runs after pending component data settles. It overrides the inherited render policy; use { adaptive: false } on the adapter when replacing its entire scheduling policy.

Progressive HTML rendering supports publishRootProps and streams document content before hydration data. Completed heads can arrive while descendant body tasks are pending. streamBufferSize sets a positive byte threshold (default 8192), with bounded read-ahead and backpressure. Complete spans may exceed the threshold. Awaiting reader cancellation waits for cleanup. See streaming behavior and limits.

String results join their request-owned chunks lazily. Response helpers pass chunks directly to capable Node adapters or use a platform-encoded Blob on Fetch hosts, avoiding extra output copies.

Plain SSR can remain script-free. Pair hydratable output with @exactjs/hydrate and matching client artifacts. Component inputs included in hydration must be deterministic and serializable.

Document from @exactjs/core/document completes partial document JSX and places framework output. Pass documentAssets with stylesheet URLs and head/bootstrap script descriptors to render assets at those slots. Hydration precedes bootstrap. Bootstrap scripts are requested after window load by default. For earlier activation, set documentAssets.bootstrapLoading to "normal". The default inline loader needs an allowed documentAssets.nonce or CSP hash under a strict script policy. Normal loading supports policies that allow only external scripts. Shells author declarations with doctype(). See document composition.

To keep an enclosing document server-only, pass documentShell while rendering the application:

import { renderToHydratableString } from '@exactjs/ssr';
import { Document } from '@exactjs/core/document';

const result = await renderToHydratableString(<App />, {
	documentShell: (application) => <Document>{application}</Document>
});

Document completes html, head, and body structure and forwards application children once. Hydrate App in its body container. Server-only shell state is excluded from hydration. Render a document-owning component as the requested root when document fields need client reactivity.

For a component root whose request data arrives through props, set publishRootProps: true and read those props with readPublishedRootProps() from @exactjs/hydrate/root before constructing the client root, passing the compiled root component as the first argument. Compiler-proven state initialized from props is published once. Serializable inputs must be deterministic and free of side effects.

Generated server entries pass their bundle-local enhancement catalog through render options. Available declarations run as ordinary server components; absent optional capabilities leave authored output unchanged and warn once per identity.

createExactServerRuntime() accepts the complete server policy as one flat options object. It normalizes context, rendering, authorization, decoding, partition, retained-build, gateway, and limit settings to their owning runtimes. Request cancellation always remains authoritative: an optional render signal can cancel work earlier but cannot detach it from the request lifetime.

See SSR and hydration, tasks, and component registries.

Documentation | Source on GitHub