Function freya::prelude::use_effect

pub fn use_effect(callback: impl FnMut() + 'static)
Expand description

Create a new effect. The effect will be run immediately and whenever any signal it reads changes. The signal will be owned by the current component and will be dropped when the component is dropped.

If the use_effect call was skipped due to an early return, the effect will no longer activate.