it almost lives?

This commit is contained in:
Evan Almloff committed 2023-07-25 18:14:48 -07:00
1 parent d637ef187c
commit 5f0dd3af3e
43 files changed
+506 -244

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ enum Route {
#[inline_props]
fn App(cx: Scope) -> Element {
render! {
Router {}
Router::<Route> {}
}
}
// ANCHOR_END: app
+3 -3
View File
@@ -35,7 +35,7 @@ enum Route {
fn App(cx: Scope) -> Element {
render! {
Router {}
Router::<Route> {}
}
}
@@ -48,7 +48,7 @@ fn NavBar(cx: Scope) -> Element {
li { Link { to: Route::BlogList {}, "Blog" } }
}
}
Outlet {}
Outlet::<Route> {}
}
}
@@ -64,7 +64,7 @@ fn Home(cx: Scope) -> Element {
fn Blog(cx: Scope) -> Element {
render! {
h1 { "Blog" }
Outlet {}
Outlet::<Route> {}
}
}
// ANCHOR_END: blog
+1 -1
View File
@@ -20,7 +20,7 @@ fn main() {}
fn GoToDioxus(cx: Scope) -> Element {
render! {
Link {
to: NavigationTarget::External("https://dioxuslabs.com".into()),
to: "https://dioxuslabs.com",
"ExternalTarget target"
}
}
+1 -1
View File
@@ -19,7 +19,7 @@ enum Route {
#[inline_props]
fn App(cx: Scope) -> Element {
render! {
Router {}
Router::<Route> {}
}
}
// ANCHOR_END: app
+3 -3
View File
@@ -39,7 +39,7 @@ enum Route {
fn App(cx: Scope) -> Element {
render! {
Router {}
Router::<Route> {}
}
}
@@ -52,7 +52,7 @@ fn NavBar(cx: Scope) -> Element {
li { Link { to: Route::BlogList {}, "Blog" } }
}
}
Outlet {}
Outlet::<Route> {}
}
}
@@ -67,7 +67,7 @@ fn Home(cx: Scope) -> Element {
fn Blog(cx: Scope) -> Element {
render! {
h1 { "Blog" }
Outlet {}
Outlet::<Route> {}
}
}
+1 -1
View File
@@ -12,7 +12,7 @@ enum Route {
#[inline_props]
fn App(cx: Scope) -> Element {
render! {
Router {
Router::<Route> {
config: || RouterConfig::default().history(WebHistory::default())
}
}
+2 -2
View File
@@ -32,7 +32,7 @@ fn NavBar(cx: Scope) -> Element {
}
}
}
Outlet {}
Outlet::<Route> {}
}
}
// ANCHOR_END: nav
@@ -41,7 +41,7 @@ fn NavBar(cx: Scope) -> Element {
#[inline_props]
fn App(cx: Scope) -> Element {
render! {
Router {}
Router::<Route> {}
}
}
// ANCHOR_END: app
+1 -1
View File
@@ -14,7 +14,7 @@ enum Route {
#[inline_props]
fn App(cx: Scope) -> Element {
render! {
Router {}
Router::<Route> {}
}
}
+2 -2
View File
@@ -26,7 +26,7 @@ fn NavBar(cx: Scope) -> Element {
}
}
// The Outlet component will render child routes (In this case just the Home component) inside the Outlet component
Outlet {}
Outlet::<Route> {}
}
}
// ANCHOR_END: nav
@@ -35,7 +35,7 @@ fn NavBar(cx: Scope) -> Element {
#[inline_props]
fn App(cx: Scope) -> Element {
render! {
Router {}
Router::<Route> {}
}
}
// ANCHOR_END: app
+2 -2
View File
@@ -16,7 +16,7 @@ fn Wrapper(cx: Scope) -> Element {
render! {
header { "header" }
// The index route will be rendered here
Outlet { }
Outlet::<Route> { }
footer { "footer" }
}
}
@@ -31,7 +31,7 @@ fn Index(cx: Scope) -> Element {
fn App(cx: Scope) -> Element {
render! {
Router {}
Router::<Route> {}
}
}
+1 -1
View File
@@ -18,7 +18,7 @@ enum Route {
#[inline_props]
fn App(cx: Scope) -> Element {
render! {
Router {
Router::<Route> {
config: || RouterConfig::default().history(WebHistory::default())
}
}
+1 -1
View File
@@ -27,7 +27,7 @@ fn Index(cx: Scope) -> Element {
fn app(cx: Scope) -> Element {
render! {
Router {
Router::<Route> {
config: || RouterConfig::default().on_update(|state|{
(state.current() == Route::Index {}).then_some(
NavigationTarget::Internal(Route::Home {})