PsychoLlama / signals

A minimal reactive signals implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Signals

A tiny, unserious alternative to preact signals and solid signals.

import { createSignal, createEffect } from 'this-lib';

const [enabled, setEnabled] = createSignal(false);
const dispose = createEffect(() => {
  if (enabled()) {
    console.log('hello, world');
  }
});

// Prints "hello, world"
setEnabled(true);

It's got the standard bells and whistles such as untracked callbacks, selectors, and batching.

Purpose

I was bored, I wanted to see how it worked. I'm not using it.

About

A minimal reactive signals implementation

License:MIT License


Languages

Language:TypeScript 96.3%Language:Nix 2.7%Language:Shell 1.0%