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

@warmjs/signals

v1.0.0

Published

Minimal fine-grained reactivity (signals + effects) for WarmJS. Zero-dependency.

Downloads

417

Readme

@warmjs/signals

Minimal fine-grained reactivity for WarmJS. Zero-dependency. Designed to pair with @warmjs/core (direct-DOM JSX with no virtual DOM).

Philosophy (Solid-like, simplified): signals are the source of truth, effects re-run only when a signal they read changes. No component re-render, no diffing.

Install

npm install @warmjs/signals

Usage

import { createSignal, createEffect, batch, bindText } from "@warmjs/signals";

// State
const [count, setCount] = createSignal(0);

// Side effect — re-runs when `count` changes
const dispose = createEffect(() => {
  console.log("count =", count());
});

setCount(1);          // logs again
setCount((p) => p + 1);

// Batch multiple writes into one flush
batch(() => {
  setCount(10);
  setCount(11);
}); // effect runs once

dispose(); // stop tracking + run cleanup

With @warmjs/core JSX

warm-core snapshots {value} into a static text node. Use bindText() for a live node:

/** @jsx h */
import { h } from "@warmjs/core";
import { createSignal, bindText } from "@warmjs/signals";

const [label, setLabel] = createSignal("Opacity");

const node = <span>{bindText(label)}</span>;
setLabel("Brightness"); // span updates, no rebuild

Cleanup

import { createEffect, onCleanup } from "@warmjs/signals";

createEffect(() => {
  const timer = setInterval(() => console.log("tick"), 1000);
  onCleanup(() => clearInterval(timer));
});

Derived values

import { createSignal, createMemo } from "@warmjs/signals";

const [w, setW] = createSignal(1200);
const [h, setH] = createSignal(600);
const area = createMemo(() => w() * h());
console.log(area()); // 720000

Escape tracking

import { untrack } from "@warmjs/signals";

createEffect(() => {
  console.log("tracked:", count());
  untrack(() => console.log("not tracked:", other()));
});

Shared reset (one button, many targets)

import { createSignal } from "@warmjs/signals";
import { createResetScope } from "@warmjs/signals";

const [opacity, setOpacity] = createSignal(100);
const [rotate, setRotate] = createSignal(0);
const [blur, setBlur] = createSignal(0);

const scope = createResetScope();
const un1 = scope.register(() => setOpacity(100));
scope.register(() => setRotate(0));
scope.register(() => setBlur(0));

scope.reset(); // all three restored in a single batch
un1();         // unregister on unmount/dispose

API

| Export | Signature | Description | |---|---|---| | createSignal | <T>(initial: T) => [get, set] | set accepts a value or updater, skips notify on Object.is equality. | | createEffect | (fn: () => void) => dispose | Runs immediately, re-runs on dependency change. | | createMemo | (fn: () => T) => getter | Cached derived getter. | | onCleanup | (fn: () => void) => void | Cleanup for the current effect pass. | | untrack | (fn: () => T) => T | Run without collecting dependencies. | | batch | (fn: () => void) => void | Coalesce writes; each effect runs at most once. | | bindText | (getter: () => unknown) => Text | Live text node for warm-core JSX. | | createResetScope | () => ResetScope | { register, reset, size } — one Reset button restores N targets in one batch. |

What it is NOT

  • No component model, no hooks rules, no scheduler priorities.
  • No store / router — Pixorig keeps those in its own core.
  • Effects run synchronously (except inside batch).

License

MIT.