wip: threadsafe
This commit is contained in:
1 parent
71f0df6374
commit
82953f2ac3
22 files changed
+414
-545
No files matched your search
@@ -0,0 +1,24 @@
|
||||
use dioxus_core as dioxus;
|
||||
use dioxus_core::prelude::*;
|
||||
use dioxus_core_macro::*;
|
||||
|
||||
use dioxus_html as dioxus_elements;
|
||||
|
||||
fn main() {
|
||||
std::thread::spawn(|| {
|
||||
let mut vdom = VirtualDom::new(App);
|
||||
let f = async_std::task::block_on(vdom.wait_for_work());
|
||||
});
|
||||
let a = 10;
|
||||
// async_std::task::spawn_blocking(|| async move {
|
||||
// });
|
||||
}
|
||||
|
||||
static App: FC<()> = |cx, props| {
|
||||
//
|
||||
cx.render(rsx!(
|
||||
div {
|
||||
"hello world!"
|
||||
}
|
||||
))
|
||||
};
|
||||
@@ -1,16 +0,0 @@
|
||||
use dioxus_core as dioxus;
|
||||
use dioxus_core::prelude::*;
|
||||
use dioxus_html as dioxus_elements;
|
||||
|
||||
fn main() {
|
||||
dioxus_desktop::launch(App, |f| f.with_window(|w| w.with_maximized(true))).expect("Failed");
|
||||
}
|
||||
|
||||
static App: FC<()> = |cx, props|{
|
||||
//
|
||||
cx.render(rsx!(
|
||||
div {
|
||||
"hello world!"
|
||||
}
|
||||
))
|
||||
};
|
||||
Reference in new issue
Block a user