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/hydrate

v0.7.1

Published

Browser hydration and server-response patching for eXact applications.

Readme

@exactjs/hydrate

Browser hydration and server-response patching for eXact applications.

Adopts @exactjs/ssr output, activates client islands, and coordinates server operations through a client owned by each root.

Usage

import { createExactClient } from '@exactjs/hydrate';

const client = createExactClient(document.getElementById('app')!, {
	islands
});

createExactClient and public hydrate discover serialized bootstrap configuration, including scripts beside the application root. An explicit configuration read is normally unnecessary. For manually supplied enhancement catalogs, the /enhanced entry activates support for both roots and islands. For inspection, readExactHydrationConfig() searches the document. Passing a root restricts the search to that subtree and returns {} if it contains no valid configuration. For detached or shadow-root content, pass the container that holds the script.

Eligible interaction-only islands load on their first supported event. Eager islands load immediately, activating dormant ancestors needed to adopt their server slots. Sibling islands share a pending ancestor load, and whenSettled() waits for the complete chain. After bootstrap capture starts, both retain supported interactions during loading and replay them after adoption. Earlier events cannot be recovered. hydration: { strategy: 'eager' } starts all eligible islands immediately.

When a server-rendered view selects a lazy registry entry, hydration loads that component before adopting its DOM. The returned root's whenSettled() promise waits for selected imports and adoption. Input edits made while loading are preserved. Event handlers become active after adoption.

Hydrate the same compiled application that produced the server output. Server endpoints remain responsible for authorization, CSRF policy, payload limits, and operation allowlists.

Generated enhancement modules register their providers and hydration support automatically. Hydration adopts compatible DOM before activating enhancements. Manual enhancement catalogs require the /enhanced entry described above.

Applications with ordinary browser-owned service calls and no compiler-generated server operations, response patches, or client islands can select the hydration-only entry:

import { hydrate } from '@exactjs/hydrate/root';

const root = hydrate(app, document.getElementById('app')!);

Bundlers can omit server-operation and island support from this entry. The main entry supports applications that need those capabilities.

When SSR uses publishRootProps: true, construct the client root from the same bounded bootstrap record instead of shipping a second application-data script:

const container = document.getElementById('app')!;
hydrateAfterNavigation(() => {
	const props = readPublishedRootProps<AppProps>(App, container);
	return <App {...props} />;
}, container);

Passing the compiled root binds any compiler-proven compact positional payload to the matching client artifact. Named payloads from older or structurally open roots remain supported. The later hydration call reuses the same decoded object graph.

hydrateAfterNavigation() schedules activation after the document is ready, or activates earlier when the user interacts. A synchronous factory defers props decoding and root creation until that activation. Static module evaluation is unchanged, and activation may precede first contentful paint. Hydrate embedded documents from their own window's runtime.

Use ExactClient.applyPatches() only for framework integrations that deliberately apply validated patches within that client's root. Direct transport invocation and unscoped patch application are package-private implementation details.

See SSR and hydration and component registries.

Documentation | Source on GitHub