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

@aihu/reactive

v0.2.2

Published

Fine-grained Proxy-backed deep reactive trees on aihu signals — lazy per-(object,key) tracking nodes, plain-assignment writes, mutate/reconcile.

Readme

@aihu/reactive

Aihu — agentic discovery and interaction, for human purpose.

Fine-grained Proxy-backed deep reactive trees on aihu signals — lazy per-(object,key) tracking nodes, plain-assignment writes, mutate/reconcile.

Design: docs/plans/2026-07-24-deep-reactivity.md.

A Solid-shaped node model (lazily allocated per-(object, key) tracking cells, allocated on first proxy touch — tracked or not) with Vue-shaped write ergonomics (plain obj.key = value assignment, no setStore(...) path tuples). Built entirely on the public @aihu/signals API — @aihu/signals is external, so this package adds zero bytes to the signals core row.

import { isReactive, reactive, mutate, unwrap } from '@aihu/reactive'
import { computed, effect } from '@aihu/signals'

const user = reactive({ name: 'Ada', address: { city: 'London' }, tags: ['math'] })

effect(() => console.log(user.address.city)) // tracks node(user,'address') + node(addr,'city')

user.address.city = 'Cambridge' // one flush → logs

mutate(user, (u) => {
  // ONE flush for three writes
  u.name = 'Ada L.'
  u.address.city = 'Bletchley'
  u.tags.push('crypto')
})

const initials = computed(() => user.name.split(' ').map((s) => s[0]).join(''))
// initials does NOT recompute when address.city changes.

localStorage.setItem('user', JSON.stringify(unwrap(user)))

isReactive(user)        // true
isReactive(unwrap(user)) // false — the raw object is not a proxy

reconcile(target, next, { key? }) merges a fresh payload (e.g. a hydration snapshot or a refetch) into target in place — unchanged nested values keep their proxy identity and notify nobody; only genuinely-changed paths flush. key controls array-item matching (default: index; pass a property name or a function for keyed reordering, e.g. { key: 'id' }).

@aihu/reactive/helpers bridges the tree ↔ tuple worlds: toSignal/ toSignals lens reactive properties as Signal tuples, toReactive goes the other way (a Signal<object> viewed as a reactive-looking object), reactivePick/reactiveOmit are read-through views (no copies), and reactiveComputed(fn) keeps a reactive object in sync with fn() via an effect + reconcile — consumers reading one key only re-run when THAT key's value actually changes.

Non-wrappable values pass through unchanged: Date, Map, Set, RegExp, class instances, DOM nodes, and frozen objects are stored raw and are replace-only — reactive() does not attempt to make them deeply reactive (see the design doc §8.8/§8.9 for the reasoning).

Nothing shipped elsewhere changes: signal/computed/effect, and every composable in @aihu/use, keep their existing contracts verbatim. This is a purely additive new import, not new behavior on an old one.

Install

npm install @aihu/reactive
# or
bun add @aihu/reactive

Auto-generated against @aihu/[email protected].

Package facts

| | | |---|---| | Version | 0.2.2 | | Tier | G — State — fine-grained Proxy-backed deep reactive trees (lazy per-key nodes, plain-assignment writes) | | Bundle size | 1.28 kB (gz) — limit 1900 B | | Published files | 3 entries | | License | MIT |

Auto-generated against @aihu/[email protected].

Exports

| Subpath | ESM | CJS | |---|---|---| | . | ./dist/index.js | — | | ./helpers | ./dist/helpers.js | — |

Auto-generated against @aihu/[email protected].

Dependencies

Dependencies:

  • @aihu/signals — ^0.5.2

Auto-generated against @aihu/[email protected].

See also

Auto-generated against @aihu/[email protected].

License

MIT — see LICENSE.

Auto-generated against @aihu/[email protected].