STATE & UPDATES
Fine-grained reactivity.
Cage, Bond, and Lotus make data flow explicit. Values and subscriptions belong to an Owner, so their lifetime stays connected to the widget tree.
C
Cage
An owned, Copy handle to mutable application state. Revise it to notify dependent computations.
B
Bond
A tracked derived value. Equality gates are opt-in and can avoid redundant downstream work.
L
Lotus
A uniform value input that lets widget builders accept static or reactive content.
Derived values without the mystery
Reads inside Bond, binding, and effect computations are tracked. A bare read while constructing a widget is not a subscription.
reactivity.rs
let count = scope.cage(1_u64);
let parity = scope
.bond(move || count.get() % 2)
.with_partial_eq();
scope.binding(move || {
println!("parity: {}", parity.get());
});
// Only affected consumers are notified.
count.revise(|value| *value += 1);Try a live widget
This counter is running through Glory's browser host. Its label derives directly from the same Cage used by the event handlers.
Clicks: 0
Ownership is part of the model
Dropping a scope invalidates its handles and cancels owned work. Collection projections and indexed lists preserve precise dependencies without scanning an entire data source.