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

+6 -6
View File
@@ -30,7 +30,7 @@ use dioxus::prelude::*;
/// }
///
/// #[component]
/// fn Index(cx: Scope) -> Element {
/// fn Index() -> Element {
/// render! {
/// div {
/// "Index"
@@ -39,7 +39,7 @@ use dioxus::prelude::*;
/// }
///
/// #[component]
/// fn Wrapper(cx: Scope) -> Element {
/// fn Wrapper() -> Element {
/// render! {
/// h1 { "App" }
/// Outlet::<Route> {} // The content of child routes will be rendered here
@@ -47,7 +47,7 @@ use dioxus::prelude::*;
/// }
///
/// #[component]
/// fn Child(cx: Scope) -> Element {
/// fn Child() -> Element {
/// render! {
/// p {
/// "Child"
@@ -56,7 +56,7 @@ use dioxus::prelude::*;
/// }
///
/// # #[component]
/// # fn App(cx: Scope) -> Element {
/// # fn App() -> Element {
/// # render! {
/// # Router::<Route> {
/// # config: || RouterConfig::default().history(MemoryHistory::with_initial_path(Route::Child {}))
@@ -68,6 +68,6 @@ use dioxus::prelude::*;
/// # let _ = vdom.rebuild();
/// # assert_eq!(dioxus_ssr::render(&vdom), "<h1>App</h1><p>Child</p>");
/// ```
pub fn Outlet<R: Routable + Clone>(cx: Scope) -> Element {
OutletContext::<R>::render(cx)
pub fn Outlet<R: Routable + Clone>() -> Element {
OutletContext::<R>::render()
}