depreciate the render macro
This commit is contained in:
1 parent
90d0164b9e
commit
e65c5f0eb3
148 files changed
+459
-458
No files matched your search
@@ -8,7 +8,7 @@ pub fn FailureExternalNavigation() -> Element {
|
||||
#[allow(deprecated)]
|
||||
let router = use_router();
|
||||
|
||||
render! {
|
||||
rsx! {
|
||||
h1 { "External Navigation Failure!" }
|
||||
p {
|
||||
"The application tried to programmatically navigate to an external page. This "
|
||||
|
||||
@@ -33,14 +33,14 @@ pub struct HistoryButtonProps {
|
||||
///
|
||||
/// #[component]
|
||||
/// fn App() -> Element {
|
||||
/// render! {
|
||||
/// rsx! {
|
||||
/// Router::<Route> {}
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// #[component]
|
||||
/// fn Index() -> Element {
|
||||
/// render! {
|
||||
/// rsx! {
|
||||
/// GoBackButton {
|
||||
/// "go back"
|
||||
/// }
|
||||
@@ -76,7 +76,7 @@ pub fn GoBackButton(
|
||||
|
||||
let disabled = !router.can_go_back();
|
||||
|
||||
render! {
|
||||
rsx! {
|
||||
button { disabled: "{disabled}", prevent_default: "onclick", onclick: move |_| router.go_back(), {children} }
|
||||
}
|
||||
}
|
||||
@@ -103,14 +103,14 @@ pub fn GoBackButton(
|
||||
///
|
||||
/// #[component]
|
||||
/// fn App() -> Element {
|
||||
/// render! {
|
||||
/// rsx! {
|
||||
/// Router::<Route> {}
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// #[component]
|
||||
/// fn Index() -> Element {
|
||||
/// render! {
|
||||
/// rsx! {
|
||||
/// GoForwardButton {
|
||||
/// "go forward"
|
||||
/// }
|
||||
@@ -146,7 +146,7 @@ pub fn GoForwardButton(
|
||||
|
||||
let disabled = !router.can_go_forward();
|
||||
|
||||
render! {
|
||||
rsx! {
|
||||
button { disabled: "{disabled}", prevent_default: "onclick", onclick: move |_| router.go_forward(), {children} }
|
||||
}
|
||||
}
|
||||
@@ -156,15 +156,15 @@ impl Debug for LinkProps {
|
||||
///
|
||||
/// #[component]
|
||||
/// fn App() -> Element {
|
||||
/// render! {
|
||||
/// rsx! {
|
||||
/// Router::<Route> {}
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// #[component]
|
||||
/// fn Index() -> Element {
|
||||
/// render! {
|
||||
/// render! {
|
||||
/// rsx! {
|
||||
/// rsx! {
|
||||
/// Link {
|
||||
/// active_class: "active",
|
||||
/// class: "link_class",
|
||||
@@ -244,7 +244,7 @@ pub fn Link(props: LinkProps) -> Element {
|
||||
}
|
||||
};
|
||||
|
||||
render! {
|
||||
rsx! {
|
||||
a {
|
||||
onclick: action,
|
||||
href: "{href}",
|
||||
|
||||
@@ -31,7 +31,7 @@ use dioxus_lib::prelude::*;
|
||||
///
|
||||
/// #[component]
|
||||
/// fn Index() -> Element {
|
||||
/// render! {
|
||||
/// rsx! {
|
||||
/// div {
|
||||
/// "Index"
|
||||
/// }
|
||||
@@ -40,7 +40,7 @@ use dioxus_lib::prelude::*;
|
||||
///
|
||||
/// #[component]
|
||||
/// fn Wrapper() -> Element {
|
||||
/// render! {
|
||||
/// rsx! {
|
||||
/// h1 { "App" }
|
||||
/// Outlet::<Route> {} // The content of child routes will be rendered here
|
||||
/// }
|
||||
@@ -48,7 +48,7 @@ use dioxus_lib::prelude::*;
|
||||
///
|
||||
/// #[component]
|
||||
/// fn Child() -> Element {
|
||||
/// render! {
|
||||
/// rsx! {
|
||||
/// p {
|
||||
/// "Child"
|
||||
/// }
|
||||
@@ -57,7 +57,7 @@ use dioxus_lib::prelude::*;
|
||||
///
|
||||
/// # #[component]
|
||||
/// # fn App() -> Element {
|
||||
/// # render! {
|
||||
/// # rsx! {
|
||||
/// # Router::<Route> {
|
||||
/// # config: || RouterConfig::default().history(MemoryHistory::with_initial_path(Route::Child {}))
|
||||
/// # }
|
||||
|
||||
@@ -146,7 +146,7 @@ where
|
||||
});
|
||||
});
|
||||
|
||||
render! { Outlet::<R> {} }
|
||||
rsx! { Outlet::<R> {} }
|
||||
}
|
||||
|
||||
#[cfg(feature = "serde")]
|
||||
@@ -171,5 +171,5 @@ where
|
||||
_marker: std::marker::PhantomData,
|
||||
});
|
||||
|
||||
render! { Outlet::<R> {} }
|
||||
rsx! { Outlet::<R> {} }
|
||||
}
|
||||
Reference in new issue
Block a user