latest
m-dressler/signalCreate truly reactive values which you can connect anywhere such as in the DOM.
This package works with Cloudflare Workers, Node.js, Deno, Bun, 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!"
Add Package
deno add jsr:@signal/core
Import symbol
import * as core from "@signal/core";
Import directly with a jsr specifier
import * as core from "jsr:@signal/core";
Add Package
pnpm i jsr:@signal/core
pnpm dlx jsr add @signal/core
Import symbol
import * as core from "@signal/core";
Add Package
yarn add jsr:@signal/core
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";