# @lwc/signals

> Provides the interface to interact with reactivity from outside the framework

Latest version **9.4.3** (published 2026-09-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @lwc/signals
pnpm add @lwc/signals
yarn add @lwc/signals
bun add @lwc/signals
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 9.4.3 |
| Published | 2026-09-02 |
| First published | 2024-02-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16.6.0 |
| Dependencies | 0 |
| Unpacked size | 15 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1792 |
| Maintainers | lwc-admin, caridy, jye-sf, ravi.jayaramappa, jodarove, abdulsattar, rax-it1, lpomerleau |
| Keywords | lwc |

## Links

- npm: https://www.npmjs.com/package/@lwc/signals
- Repository: https://github.com/salesforce/lwc
- Homepage: https://lwc.dev
- Issues: https://github.com/salesforce/lwc/issues
- npm.io page: https://npm.io/package/@lwc/signals

## Recent versions

- 9.4.3 (latest) — 2026-09-02
- 9.4.6-alpha.1 (canary) — 2026-09-22
- 9.3.10 (winter27) — 2026-09-21
- 9.1.5 (summer26) — 2026-04-28
- 8.25.1 (spring26) — 2025-11-19
- 8.20.6 (winter26) — 2025-10-20
- 8.16.5 (summer25) — 2025-05-05
- 8.10.3 (spring25) — 2025-01-09
- 7.1.5 (winter25) — 2024-10-10
- 7.0.1-alpha.0 (next) — 2024-06-21
- 6.4.5 (summer24) — 2024-06-05
- 9.4.6-alpha.0 — 2026-09-11
- 9.3.9 — 2026-09-09
- 9.3.8 — 2026-09-03
- 9.4.2 — 2026-09-01
- … 162 more at https://npm.io/package/@lwc/signals/versions

## README

# @lwc/signals

This is an experimental package containing the interface expected for signals.

A key point to note is that when a signal is both bound to an LWC class member variable and used on a template,
the LWC engine will attempt to subscribe a callback to rerender the template.

## Reactivity with Signals

A Signal is an object that holds a value and allows components to react to changes to that value.
It exposes a `.value` property for accessing the current value, and `.subscribe` methods for responding to changes.

```js
import { signal } from 'some/signals';

export default class ExampleComponent extends LightningElement {
    count = signal(0);

    increment() {
        this.count.value++;
    }
}
```

In the template, we can bind directly to the `.value` property:

```html
<template>
    <button onclick="{increment}">Increment</button>
    <p>{count.value}</p>
</template>
```

## Supported APIs

This package supports the following APIs.

### Signal

This is the shape of the signal that the LWC engine expects.

```js
export type OnUpdate = () => void;
export type Unsubscribe = () => void;

export interface Signal<T> {
    get value(): T;
    subscribe(onUpdate: OnUpdate): Unsubscribe;
}
```

### SignalBaseClass

A base class is provided as a starting point for implementation.

```js
export abstract class SignalBaseClass<T> implements Signal<T> {
    abstract get value(): T;

    private subscribers: Set<OnUpdate> = new Set();

    subscribe(onUpdate: OnUpdate) {
        this.subscribers.add(onUpdate);
        return () => {
            this.subscribers.delete(onUpdate);
        };
    }

    protected notify() {
        for (const subscriber of this.subscribers) {
            subscriber();
        }
    }
}
```

---
_Source: https://npm.io/package/@lwc/signals · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
