factor out a hot reloading connect function

This commit is contained in:
= committed 2023-01-11 16:43:41 -06:00
1 parent e5e1abbdac
commit 042b67b61b
11 files changed
+47 -112

No files matched your search

+3 -1
View File
@@ -106,7 +106,9 @@ where
#[cfg(all(feature = "hot-reload", debug_assertions))]
let mut hot_reload_rx = {
let (tx, rx) = tokio::sync::mpsc::unbounded_channel();
crate::hot_reload::init(tx);
dioxus_hot_reload::connect(move |template| {
let _ = tx.send(template);
});
rx
};