Function dioxus_timer::use_shared_timer
source · pub fn use_shared_timer(cx: Scope<'_>)Expand description
Manages a shared DioxusTimer instance within the Dioxus GUI framework using the provided Scope.
§Examples
dioxus_timer::use_shared_timer(cx);
let timer = use_shared_state::<dioxus_timer::DioxusTimer>(cx)?;
let state = timer.read().state();
let start_handle = move |_| { timer.write().start(); };