Use futures_util mutex instead of flume for sending flush lock wakeups
This commit is contained in:
14 files changed
+100
-43
No files matched your search
+2
-2
@@ -7,7 +7,7 @@ fn main() {
|
||||
|
||||
fn app() -> Element {
|
||||
let mut breed = use_signal(|| "deerhound".to_string());
|
||||
let breed_list = use_async_memo(move || async move {
|
||||
let breed_list = use_resource(move || async move {
|
||||
let list = reqwest::get("https://dog.ceo/api/breeds/list/all")
|
||||
.await
|
||||
.unwrap()
|
||||
@@ -44,7 +44,7 @@ fn app() -> Element {
|
||||
|
||||
#[component]
|
||||
fn BreedPic(breed: Signal<String>) -> Element {
|
||||
let fut = use_async_memo(move || async move {
|
||||
let fut = use_resource(move || async move {
|
||||
reqwest::get(format!("https://dog.ceo/api/breed/{breed}/images/random"))
|
||||
.await
|
||||
.unwrap()
|
||||
|
||||
Reference in new issue
Block a user