mizchi/luna/core/signal does not have a README file
pub enum AsyncState[T] {
Pending
Success(T)
Failure(String)
}pub struct EffectRunner {
id : Int
run : () -> Unit
}fn[T] computed(compute : () -> T) -> (() -> T)fn[T] create_root(f : (() -> Unit) -> T) -> Tfn[T] create_root_with_dispose(f : () -> T) -> (T, () -> Unit)fn effect(fn_ : () -> Unit) -> (() -> Unit)fn effect_once(fn_ : () -> Unit) -> Unitfn effect_when(condition : () -> Bool, fn_ : () -> Unit) -> (() -> Unit)fn[T] memo(compute : () -> T) -> (() -> T)fn on_mount(fn_ : () -> Unit) -> Unitlet theme_ctx = create_context("light")
provide(theme_ctx, "dark", fn() {
// All components here will see "dark"
my_component()
})fn register_disposer(disposer : () -> Unit) -> Unitfn register_owner_cleanup(cleanup : () -> Unit) -> Unitfn[T] untracked(f : () -> T) -> Tlet theme = use_context(theme_ctx) // Returns "dark" or default