chore: clean up examples and fix link opening code

This commit is contained in:
Jonathan Kelley committed 2022-01-31 19:40:48 -05:00
1 parent cc99fa8eb2
commit 6905bf98d7
7 files changed
+28 -31

No files matched your search

+2 -2
View File
@@ -16,7 +16,7 @@ struct ListBreeds {
}
fn app(cx: Scope) -> Element {
let fut = use_future(&cx, || async move {
let breeds = use_future(&cx, || async move {
reqwest::get("https://dog.ceo/api/breeds/list/all")
.await
.unwrap()
@@ -26,7 +26,7 @@ fn app(cx: Scope) -> Element {
let (breed, set_breed) = use_state(&cx, || None);
match fut.value() {
match breeds.value() {
Some(Ok(breeds)) => cx.render(rsx! {
div {
h1 {"Select a dog breed!"}