Skip to main content

euv_ui/hook/use_mounted/
struct.rs

1use super::*;
2
3/// Reactive state for the mount flag.
4///
5/// The flag is `false` while the first render is still being built and
6/// `true` once the DOM has been committed.
7///
8/// It exists for the decisions that must not be taken during a render:
9/// focusing an input, measuring a box, or starting an animation that
10/// should begin from the committed layout rather than from a layout
11/// that does not exist yet.
12#[derive(Clone, CustomDebug, Data)]
13pub struct UseMounted {
14    /// Whether the component has been mounted.
15    #[get(type(copy))]
16    pub mounted: Signal<bool>,
17}