ng-queuex

November 24, 2025 Β· View on GitHub

alt text

ng-queuex

Queuex is an experimental ecosystem for Angular that introduces a React-inspired concurrent scheduler
and a set of signal-driven structural directives for fine-grained, isolated change detection.

Unlike traditional Angular patterns (services, RxJS-heavy abstractions), Queuex provides a minimal API:
just a scheduler exposed in simple functional API and directives built directly on top of Angular’s Signal API.


✨ Why Queuex?

Angular's default change detection is global, synchronous, and tied to the logical tree.
Queuex takes a different approach:

  • πŸ”Ή Minimal & functional API – no services, no RxJS boilerplate, just functions and signals.
  • πŸ”Ή Concurrent scheduler – inspired by React, with priority levels and abortable tasks.
  • πŸ”Ή Fine-grained change detection – run detection only where it’s needed.
  • πŸ”Ή Hydration-aware – application stabilization (ApplicationRef#onStable) waits until the scheduler is idle.
  • πŸ”Ή Server-side transparent – on the server, all directives gracefully fall back to Angular’s native behavior.

πŸ“¦ Packages

@ng-queuex/core

Core utilities and the concurrent scheduler.

⚠️ Note: Scheduling functions are client-side only.
On the server they intentionally throw, ensuring that developers provide explicit server side fallbacks (as demonstrated in @ng-queuex/template).
Other utilities in this package remain safe to use in both environments.

  • scheduleTask() – enqueue clean, abortable tasks.
  • detectChanges() / scheduleChangeDetection() – enqueue dirty tasks with built-in coalescing.
  • Designed to be minimal and functional: no Angular DI services, no RxJS.
  • Hydration-aware: delays ApplicationRef#onStable until the scheduler is idle.

➑️ Read more


@ng-queuex/template

Signal-driven structural directives powered by the core scheduler.

⚠️ Note: All directives are built upon signal APIs, so its usage is restricted to immutable objects.

  • *qxIf – granular alternative to NgIf.
  • *qxFor – concurrent alternative to NgForOf.
  • *watch – elegant property binding to DOM.
  • *qxSwitch, *qxSwitchCase, *qxSwitchDefault.
  • *lazyView, *scheduledView, *reactiveView – lazy rendering with different levels of isolation and scheduling.
  • All directives are SSR-friendly with transparent fallbacks, and compatible with Hydration.

➑️ Read more


πŸš€ Getting Started

Install the main packages:

npm install https://github.com/dagnygus/ng-queuex/releases/download/v0.0.4/ng-queuex-core-0.0.5.tgz
npm install https://github.com/dagnygus/ng-queuex/releases/download/v0.0.4/ng-queuex-template-0.0.5.tgz

πŸ›  Example

import { scheduleTest, Priority } from "@ng-queuex/core"

const abort = scheduleTask(() => {
  console.log('running with highest priority.')
}, Priority.Highest)

// Later, if needed
abort();
<span *watch [textContent]="personName()"></span>

πŸ“– Public API

@ng-queuex/core
@ng-queuex/template

πŸ—Ί Roadmap

  • βœ… Core scheduler (done)
  • βœ… Template directives (done)
  • πŸ”„ Package dedicated for angular signals
  • πŸ”„ Virtual scrolling and virtualization