Skip to main content
Home

Create truly reactive values which you can connect anywhere such as in the DOM.

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
100%
Published
a year ago (0.0.0)

Signal

A group of features all centered around one idea: create truly reactive values without overhead or compilation.

The premise is really simple, you wrap a value which other logic needs to react to in Signal(value) and others will know when it changed. The main application currently is in the module @signal/html which enables a reactive DOM.

Use

const example = Signal('');
example.listen(next => console.log("Value:", next));
example.value = 'hello'; // Logs "Value: hello"

const exclaimed = example.derive(next => next + "!");
exclaimed.listen(next => console.log("Exclaimed:", next));
example.value += ' world'; // Logs "Value: hello world" and "Exclaimed: hello world!"

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@signal/core

Import symbol

import * as core from "@signal/core";
or

Import directly with a jsr specifier

import * as core from "jsr:@signal/core";

Add Package

pnpm i jsr:@signal/core
or (using pnpm 10.8 or older)
pnpm dlx jsr add @signal/core

Import symbol

import * as core from "@signal/core";

Add Package

yarn add jsr:@signal/core
or (using Yarn 4.8 or older)
yarn dlx jsr add @signal/core

Import symbol

import * as core from "@signal/core";

Add Package

npx jsr add @signal/core

Import symbol

import * as core from "@signal/core";

Add Package

bunx jsr add @signal/core

Import symbol

import * as core from "@signal/core";