Merge branch 'master' into jk/global-window-fun

This commit is contained in:
Jonathan Kelley authored and GitHub committed 2024-01-04 10:22:10 -08:00
commit 799be5e4e3
200 files changed
+6082 -2375

No files matched your search

+2 -8
View File
@@ -25,14 +25,8 @@ fn app(cx: Scope) -> Element {
button {
onclick: move |_| {
let dom = VirtualDom::new_with_props(compose, ComposeProps {
app_tx: tx.clone()
});
// this returns a weak reference to the other window
// Be careful not to keep a strong reference to the other window or it will never be dropped
// and the window will never close.
dioxus_desktop::window().new_window(dom, Default::default());
let dom = VirtualDom::new_with_props(compose, ComposeProps { app_tx: tx.clone() });
window.new_window(dom, Default::default());
},
"Click to compose a new email"
}