feat: apply local router changes

This commit is contained in:
Jonathan Kelley committed 2022-03-04 13:16:37 -05:00
1 parent 3928856a9b
commit f2979cb12a
28 files changed
+672 -516

No files matched your search

Whitespace-only changes.
+29
View File
@@ -0,0 +1,29 @@
#![allow(non_snake_case)]
use dioxus_core::prelude::*;
use dioxus_core_macro::*;
use dioxus_html as dioxus_elements;
use dioxus_router::*;
#[test]
fn generates_without_error() {
let mut app = VirtualDom::new(app);
app.rebuild();
let out = dioxus_ssr::render_vdom(&app);
assert_eq!(out, "<nav>navbar</nav><h1>Home</h1>");
}
fn app(cx: Scope) -> Element {
cx.render(rsx! {
Router {
nav { "navbar" }
Route { to: "/home", Home {} }
}
})
}
fn Home(cx: Scope) -> Element {
cx.render(rsx! { h1 { "Home" } })
}
File renamed without changes.