wip: threadsafe
This commit is contained in:
1 parent
71f0df6374
commit
82953f2ac3
22 files changed
+414
-545
No files matched your search
@@ -7,15 +7,22 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
fn main() {
|
||||
// dioxus::desktop::launch(App, |c| c);
|
||||
dioxus::desktop::launch(App, |c| c);
|
||||
}
|
||||
|
||||
const ENDPOINT: &str = "https://api.openweathermap.org/data/2.5/weather";
|
||||
|
||||
static App: FC<()> = |cx, props| {
|
||||
//
|
||||
let body = use_suspense(
|
||||
cx,
|
||||
|| async {
|
||||
//
|
||||
let content = reqwest::get(ENDPOINT)
|
||||
.await
|
||||
.unwrap()
|
||||
.json::<serde_json::Value>()
|
||||
.await
|
||||
.unwrap();
|
||||
},
|
||||
|cx, props| {
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user