factor out a hot reloading connect function
This commit is contained in:
1 parent
e5e1abbdac
commit
042b67b61b
11 files changed
+47
-112
No files matched your search
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user