askill
example-signals-animation

example-signals-animationSafety 85Repository

Learn how to use Helios Signals for high-performance, fine-grained reactivity. Use for complex dependency graphs or when optimizing performance.

0 stars
1.2k downloads
Updated 2/3/2026

Package Files

Loading files...
SKILL.md

Signals Animation

Helios exposes a Signal-based reactivity system (similar to SolidJS or Preact Signals) for managing state efficiently.

Quick Start

import { Helios, computed, effect } from '@helios-project/core';

const helios = new Helios({ duration: 10, fps: 60 });

// Access signals directly
const frame = helios.currentFrame; // ReadonlySignal<number>

// Create computed values
const rotation = computed(() => {
  return (frame.value / 60) * 360; // Rotate 360 deg per second
});

// React to changes
effect(() => {
  const div = document.getElementById('box');
  div.style.transform = `rotate(${rotation.value}deg)`;
});

Key Patterns

Derived State

Use computed() to create state that depends on other signals. It only re-evaluates when dependencies change.

const progress = computed(() => helios.currentFrame.value / (helios.duration * helios.fps));
const width = computed(() => progress.value * 100 + '%');

Side Effects

Use effect() to perform DOM updates or rendering logic. Effects run immediately and re-run whenever any signal accessed inside them changes.

Performance

Signals are more efficient than helios.subscribe() for complex graphs because they update fine-grained dependencies rather than the entire state tree.

Source

  • Example: examples/signals-animation/
  • API: packages/core/src/signals.ts

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

78/100Analyzed 2/16/2026

A well-structured skill demonstrating Helios Signals reactivity system with practical code examples. Good technical reference for computed values, effects, and performance patterns, though tied to a specific library.

85
85
65
75
80

Metadata

Licenseunknown
Version-
Updated2/3/2026
PublisherBintzGavin

Tags

api