preset library

Classes

ComputedNode<T>
A reactive computed node that derives its value from other reactive nodes.
EffectNode
A reactive effect node that runs side effects in response to changes.
LinkedEffect
A reactive node that can be linked in a queue of effects.
PresetReactiveSystem
Default implementation of the reactive system for Alien Signals.
SignalNode<T>
A reactive signal node that holds a value of type T.

Properties

activeSub ReactiveNode?
The currently active subscriber node.
getter/setter pair
batchDepth int
Current depth of nested batch operations.
getter/setter pair
checkDirty bool Function(Link link, ReactiveNode sub)
final
cycle int
Global version counter for tracking dependency updates.
getter/setter pair
final
propagate → void Function(Link link)
final
queuedEffects LinkedEffect?
Head of the queue of effects waiting to be executed.
getter/setter pair
queuedEffectsTail LinkedEffect?
Tail of the effects queue for O(1) append operations.
getter/setter pair
shallowPropagate → void Function(Link link)
final
final

Functions

endBatch() → void
Ends the current batch operation.
flush() → void
Flushes all queued effects, executing them in order.
getActiveSub() ReactiveNode?
Gets the currently active subscriber node.
getBatchDepth() int
Gets the current batch depth.
purgeDeps(ReactiveNode sub) → void
Removes all stale dependencies from a subscriber node.
run(EffectNode e) → void
Executes an effect node if it needs updating.
setActiveSub([ReactiveNode? sub]) ReactiveNode?
Sets the active subscriber node and returns the previous one.
startBatch() → void
Starts a new batch operation.
stop(ReactiveNode node) → void
Stops a reactive node and removes it from the reactive system.
trigger(void fn()) → void
Manually triggers reactive updates within a function.