Fix the router and stub out a number of crates to get compiling

This commit is contained in:
Jonathan Kelley committed 2024-01-13 20:51:37 -08:00
1 parent 4c6e515da4
commit fae0b08e61
226 files changed
+1057 -1482

No files matched your search

@@ -74,9 +74,9 @@ fn main() {
}
}
//
fn app(cx: Scope) -> Element {
let user_name = use_state(cx, || "?".to_string());
let permissions = use_state(cx, || "?".to_string());
fn app() -> Element {
let user_name = use_state(|| "?".to_string());
let permissions = use_state(|| "?".to_string());
cx.render(rsx! {
div {
@@ -2,9 +2,9 @@
use dioxus::prelude::*;
use dioxus_fullstack::prelude::*;
pub fn app(cx: Scope) -> Element {
let mut count = use_state(cx, || 0);
let text = use_state(cx, || "...".to_string());
pub fn app() -> Element {
let mut count = use_state(|| 0);
let text = use_state(|| "...".to_string());
cx.render(rsx! {
h1 { "High-Five counter: {count}" }
@@ -20,10 +20,10 @@ struct AppProps {
fn app(cx: Scope<AppProps>) -> Element {
let state =
use_server_future(cx, (), |()| async move { get_server_data().await.unwrap() })?.value();
use_server_future((), |()| async move { get_server_data().await.unwrap() })?.value();
let mut count = use_state(cx, || 0);
let text = use_state(cx, || "...".to_string());
let mut count = use_state(|| 0);
let text = use_state(|| "...".to_string());
let eval = use_eval(cx);
cx.render(rsx! {
@@ -32,7 +32,7 @@ enum Route {
}
#[component]
fn Blog(cx: Scope, id: i32) -> Element {
fn Blog(id: i32) -> Element {
render! {
Link { to: Route::Home {}, "Go to counter" }
table {
@@ -50,9 +50,9 @@ fn Blog(cx: Scope, id: i32) -> Element {
}
#[component]
fn Home(cx: Scope) -> Element {
let mut count = use_state(cx, || 0);
let text = use_state(cx, || "...".to_string());
fn Home() -> Element {
let mut count = use_state(|| 0);
let text = use_state(|| "...".to_string());
cx.render(rsx! {
Link {
@@ -17,10 +17,10 @@ struct AppProps {
fn app(cx: Scope<AppProps>) -> Element {
let state =
use_server_future(cx, (), |()| async move { get_server_data().await.unwrap() })?.value();
use_server_future((), |()| async move { get_server_data().await.unwrap() })?.value();
let mut count = use_state(cx, || 0);
let text = use_state(cx, || "...".to_string());
let mut count = use_state(|| 0);
let text = use_state(|| "...".to_string());
cx.render(rsx! {
div {
@@ -50,7 +50,7 @@ enum Route {
}
#[component]
fn Blog(cx: Scope) -> Element {
fn Blog() -> Element {
render! {
Link { to: Route::Home {}, "Go to counter" }
table {
@@ -68,9 +68,9 @@ fn Blog(cx: Scope) -> Element {
}
#[component]
fn Home(cx: Scope) -> Element {
let mut count = use_state(cx, || 0);
let text = use_state(cx, || "...".to_string());
fn Home() -> Element {
let mut count = use_state(|| 0);
let text = use_state(|| "...".to_string());
cx.render(rsx! {
Link {
@@ -17,10 +17,10 @@ struct AppProps {
fn app(cx: Scope<AppProps>) -> Element {
let state =
use_server_future(cx, (), |()| async move { get_server_data().await.unwrap() })?.value();
use_server_future((), |()| async move { get_server_data().await.unwrap() })?.value();
let mut count = use_state(cx, || 0);
let text = use_state(cx, || "...".to_string());
let mut count = use_state(|| 0);
let text = use_state(|| "...".to_string());
cx.render(rsx! {
div {