# pledgestack-client

> Client-side hydration and routing runtime for PledgeStack

Latest version **0.2.0** (published 2026-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install pledgestack-client
pnpm add pledgestack-client
yarn add pledgestack-client
bun add pledgestack-client
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2026-09-24 |
| First published | 2026-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20.0.0 |
| Dependencies | 1 |
| Unpacked size | 157.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | PledgeStack Contributors |
| Maintainers | mehdi-berel |
| Keywords | pledgestack, react, framework, client, hydration, router |

## Links

- npm: https://www.npmjs.com/package/pledgestack-client
- Repository: https://github.com/pledgeandgrow/pledgejs
- Homepage: https://github.com/pledgeandgrow/pledgejs/tree/main/packages/client#readme
- Issues: https://github.com/pledgeandgrow/pledgejs/issues
- npm.io page: https://npm.io/package/pledgestack-client

## Dependencies (1)

- [pledgestack-shared](https://npm.io/package/pledgestack-shared.md) 0.2.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2026-09-24

## README

# pledgestack-client

Browser runtime for PledgeStack React apps: hydration, the client-side router and prefetching, `pledge()` interactive islands, form/data/offline hooks, web-vitals reporting and the dev error overlay/toolbar.

> Part of [PledgeStack](https://github.com/pledgeandgrow/pledgejs). Most applications only need the [`pledgestack`](https://www.npmjs.com/package/pledgestack) package, which bundles this functionality; install this package directly when composing pieces yourself.

## Install

```bash
pnpm add pledgestack-client react react-dom
```

Requires Node.js >= 20. The package is ESM-only and ships TypeScript declarations.

## Usage

```tsx
import { Link, useRouter } from 'pledgestack-client';

export function Nav() {
  const router = useRouter();
  return <Link href="/about" onClick={() => console.log(router.pathname)}>About</Link>; // router: { pathname, params, query, navigate, back, prefetch, ... }
}
```

## API

- Router: `RouterProvider`, `Link`, `useRouter`, `resolveRouteElement`, prefetching.
- Hydration: `hydrate`, `initPledgeHydration`, `pledge` islands, selective hydration.
- Hooks: form (`useFormStatus`-style), `useActionState`, data, optimistic, offline, web vitals.
- Dev: error overlay, fast refresh, dev toolbar.

## Notes

Most apps use these through the `pledgestack/client` entry of the main package; install this package directly only when composing PledgeStack pieces yourself.

## License

MIT

---
_Source: https://npm.io/package/pledgestack-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
