Module state

Source
Expand description

State management system for the Orbit UI framework

This module provides several approaches to state management:

  1. StateContainer - A basic state container that stores values and notifies subscribers when values change
  2. State<T> - A typed reference to a value in the state container
  3. Computed<T> - A derived state value that depends on other values
  4. The reactive module - A fine-grained reactive system with signals and effects

Structs§

Computed
Represents a computed state value that depends on other state
Effect
A reactive effect that runs when its dependencies change
ReactiveComputed
A computed value that derives from other reactive values
ReactiveScope
Reactive scope that manages signals, effects, and computed values
Signal
A reactive signal that holds a value
State
Represents a reactive value that can be observed for changes
StateContainer
State management for Orbit applications

Enums§

SignalError
Errors that can occur in the reactive system

Functions§

create_computed
Create a new computed value
create_effect
Create a new effect that runs when dependencies change
create_signal
Create a new signal with an initial value