depreciate the render macro

This commit is contained in:
Evan Almloff committed 2024-01-16 13:18:46 -06:00
1 parent 90d0164b9e
commit e65c5f0eb3
148 files changed
+459 -458

No files matched your search

+10 -10
View File
@@ -31,7 +31,7 @@ where
where
<R as FromStr>::Err: std::fmt::Display,
{
render! {
rsx! {
h1 { "App" }
Router::<R> {
config: || RouterConfig::default().history(MemoryHistory::default())
@@ -57,7 +57,7 @@ fn href_internal() {
#[component]
fn Root() -> Element {
render! {
rsx! {
Link {
to: Route::Test {},
"Link"
@@ -95,7 +95,7 @@ fn href_external() {
#[component]
fn Root() -> Element {
render! {
rsx! {
Link {
to: "https://dioxuslabs.com/",
"Link"
@@ -133,7 +133,7 @@ fn with_class() {
#[component]
fn Root() -> Element {
render! {
rsx! {
Link {
to: Route::Test {},
class: "test_class",
@@ -165,7 +165,7 @@ fn with_active_class_active() {
#[component]
fn Root() -> Element {
render! {
rsx! {
Link {
to: Route::Root {},
active_class: "active_class",
@@ -205,7 +205,7 @@ fn with_active_class_inactive() {
#[component]
fn Root() -> Element {
render! {
rsx! {
Link {
to: Route::Test {},
active_class: "active_class",
@@ -245,7 +245,7 @@ fn with_id() {
#[component]
fn Root() -> Element {
render! {
rsx! {
Link {
to: Route::Test {},
id: "test_id",
@@ -284,7 +284,7 @@ fn with_new_tab() {
#[component]
fn Root() -> Element {
render! {
rsx! {
Link {
to: Route::Test {},
new_tab: true,
@@ -316,7 +316,7 @@ fn with_new_tab_external() {
#[component]
fn Root() -> Element {
render! {
rsx! {
Link {
to: "https://dioxuslabs.com/",
new_tab: true,
@@ -355,7 +355,7 @@ fn with_rel() {
#[component]
fn Root() -> Element {
render! {
rsx! {
Link {
to: Route::Test {},
rel: "test_rel",
+8 -8
View File
@@ -36,7 +36,7 @@ fn prepare(path: impl Into<String>) -> VirtualDom {
#[component]
fn App(cx: Scope<AppProps>) -> Element {
render! {
rsx! {
h1 { "App" }
Router::<Route> {
config: {
@@ -49,14 +49,14 @@ fn prepare(path: impl Into<String>) -> VirtualDom {
#[component]
fn RootIndex() -> Element {
render! {
rsx! {
h2 { "Root Index" }
}
}
#[component]
fn Fixed() -> Element {
render! {
rsx! {
h2 { "Fixed" }
Outlet::<Route> { }
}
@@ -64,21 +64,21 @@ fn prepare(path: impl Into<String>) -> VirtualDom {
#[component]
fn FixedIndex() -> Element {
render! {
rsx! {
h3 { "Fixed - Index" }
}
}
#[component]
fn FixedFixed() -> Element {
render! {
rsx! {
h3 { "Fixed - Fixed"}
}
}
#[component]
fn Parameter(id: u8) -> Element {
render! {
rsx! {
h2 { "Parameter {id}" }
Outlet::<Route> { }
}
@@ -86,14 +86,14 @@ fn prepare(path: impl Into<String>) -> VirtualDom {
#[component]
fn ParameterIndex(id: u8) -> Element {
render! {
rsx! {
h3 { "Parameter - Index" }
}
}
#[component]
fn ParameterFixed(id: u8) -> Element {
render! {
rsx! {
h3 { "Parameter - Fixed" }
}
}