Skip to main content

Battle-tested reactivity primitives. Extensive signals library.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
76%
Published
2 months ago (0.0.40)

Signalhead

Battle-tested reactivity primitives.

Signalhead is a lightweight, framework-agnostic toolkit for managing reactive state in interactive apps. Whether you're mapping, filtering, or zipping signals together, Signalhead keeps your code clean and reactive state management fun and glitchless. It also works great with arrays, sets and promises.

import { mut } from "@typek/signalhead";

const count = mut(1);
const double = count.map(n => 2 * n);

const user = mut(fetchUserData());
const name = user.await().map(
  (p) => p.status === "fullfilled" ? p.value.name : "Loading..."
);

name.subscribe(n => console.log(n));
// Loading...
// Joe

Docs: Signal, WritableSignal, AwaitedSignal, derived, mutDerived, effect, Flock, MutFlock, Pack, MutPack

Git: Repo, Issues, Discussions

Add Package

deno add jsr:@typek/signalhead

Import symbol

import * as mod from "@typek/signalhead";

---- OR ----

Import directly with a jsr specifier

import * as mod from "jsr:@typek/signalhead";

Add Package

npx jsr add @typek/signalhead

Import symbol

import * as mod from "@typek/signalhead";

Add Package

yarn dlx jsr add @typek/signalhead

Import symbol

import * as mod from "@typek/signalhead";

Add Package

pnpm dlx jsr add @typek/signalhead

Import symbol

import * as mod from "@typek/signalhead";

Add Package

bunx jsr add @typek/signalhead

Import symbol

import * as mod from "@typek/signalhead";