# @webreflection/alien-signals

> alien-signals with a Preact signals like API

Latest version **0.4.2** (published 2025-10-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @webreflection/alien-signals
pnpm add @webreflection/alien-signals
yarn add @webreflection/alien-signals
bun add @webreflection/alien-signals
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.4.2 |
| Published | 2025-10-18 |
| First published | 2025-04-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | Andrea Giammarchi |
| Maintainers | webreflection |
| Keywords | alien-signals, Preact, signals, reactive, reactivity |

## Links

- npm: https://www.npmjs.com/package/@webreflection/alien-signals
- Repository: https://github.com/WebReflection/alien-signals
- Homepage: https://github.com/WebReflection/alien-signals#readme
- Issues: https://github.com/WebReflection/alien-signals/issues
- npm.io page: https://npm.io/package/@webreflection/alien-signals

## Dependencies (1)

- [alien-signals](https://npm.io/package/alien-signals.md) ^3.0.1

## Recent versions

- 0.4.2 (latest) — 2025-10-18
- 0.4.1 — 2025-10-18
- 0.4.0 — 2025-10-18
- 0.3.2 — 2025-08-05
- 0.3.1 — 2025-08-03
- 0.3.0 — 2025-08-01
- 0.2.1 — 2025-08-01
- 0.2.0 — 2025-05-22
- 0.1.0 — 2025-04-17
- 0.0.1 — 2025-04-17
- 0.0.0 — 2025-04-17

## README

# @webreflection/alien-signals

[alien-signals](https://github.com/stackblitz/alien-signals) with a [Preact signals](https://preactjs.com/guide/v10/signals/) like API and a class based approach for easy brand check.

```js
import {
  Signal, signal,
  Computed, computed,
  effect, untracked, batch,
  // all other alien-signals exports
} from '@webreflection/alien-signals';

const count = signal(0);
const double = computed(() => count * 2);
//               implicit count.valueOf()

console.assert(count instanceof Signal);  // true
console.assert(double instanceof Signal); // true

effect(() => {
  console.log('count', count.peek());
  //                  no subscription

  console.log('double', double.value);
});

count.value++;
```

# Extra Feature

A signal created via `signal(value, { greedy: true })` will effect any time the same value is set again, as opposite of ignoring the explicit *set* operation.

Follow this discussion if interest in upstream feedbacks: https://github.com/stackblitz/alien-signals/issues/83

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