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

v0.7.1

Published

Fine-grained reactive primitives and observable collections used by eXact.

Readme

@exactjs/reactive

Fine-grained reactive primitives and observable collections used by eXact.

When to use it

Component authors should normally read and mutate this.state directly. Use this package when building a standalone reactive model, a reusable library abstraction, or a framework integration.

Usage

import { computed, reactive } from '@exactjs/reactive';

const state = reactive({ quantity: 2, price: 5 });
const subtotal = computed(() => state.quantity * state.price);

state.quantity++;
console.log(subtotal.get());

Computed reads are lazy, cached, and synchronously current through transitive computed chains. A read after a write settles only the required upstream graph; scheduled watchers and UI consequences remain coalesced. Equal effective results stop downstream propagation, and a direct or indirect computed cycle throws a bounded eXact diagnostic.

A computed selection preserves reactive objects and collections. Reading fields through that selection still tracks in-place updates. Switching to another reactive reference moves those subscriptions even when its current fields are equal; newly calculated plain results continue to use structural equality.

A standalone computed that has no watcher is pull-only. It retains enough source-version evidence to validate a later read, but its sources do not retain it after that read. watch() or subscribe() attaches the reverse edges needed for push scheduling and releases them when stopped. Computeds created inside an effect scope remain scope-owned and release their dependencies when the scope stops. Already evaluated values remain frozen after disposal. An unread disposed computed resolves once on its first explicit read without restoring subscriptions. inspectComputed() returns value-free status and bounded edge counts without observing the value.

The package includes reactive objects and collections, computed values, watchers, batching, effect scopes, scheduling priorities, structural result equality, and external-source support. Arrays, Map, and Set retain their familiar JavaScript operations.

For an ordinary helper that needs explicit access to caller-supplied state, use stateAccess(value) and accept a StateAccess<T> parameter. Its read, write, and remove operations preserve the supplied value's reactive or task-view policy. sameStateTarget(a, b) compares storage identity across views without exposing raw storage. These optional named exports are tree-shakeable. Task views retain their creating task's lifetime and must not be reused later. See the task reference for identity, native receiver and transactional limits.

For application task and optimistic-state patterns, see actions and forms.

An aborted batch() restores collection insertion order as well as values. Optimistic journals preserve newer authoritative writes when they roll back. Integrations can call whenEffectScopeResumed(scope, signal) to wait for resumption or disposal; aborting the optional signal resolves the wait and releases its registration without resuming the scope.

Documentation | Source on GitHub