Skip to main content

Module effects

Module effects 

Source

Structs§

Dispose

Functions§

effect
Runs f() immediately and returns its Dispose, registering cleanup on the current scope when one exists. Like scoped_effect, this runs on every call - for mount-once semantics use scoped_effect_once or disposable_effect.
effect_once
Mount-once effect: runs f only the first time this call site composes. Later recompositions return the original Dispose without re-running setup.
effect_once_with_key
on_unmount
Helper to register cleanup inside effect.