2021-03-09 19:45:52 +00:00
|
|
|
use dioxus_core::component::fc_to_builder;
|
2021-03-08 02:28:20 +00:00
|
|
|
use dioxus_core::prelude::*;
|
|
|
|
|
2021-06-01 22:33:15 +00:00
|
|
|
static BLAH: FC<()> = |ctx| {
|
2021-03-09 19:45:52 +00:00
|
|
|
let g = "asd".to_string();
|
2021-03-08 02:28:20 +00:00
|
|
|
ctx.render(rsx! {
|
|
|
|
div {
|
|
|
|
SomeComponent {
|
2021-03-09 19:45:52 +00:00
|
|
|
some_field: g
|
2021-03-08 02:28:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
2021-03-09 19:45:52 +00:00
|
|
|
};
|
2021-03-08 02:28:20 +00:00
|
|
|
|
2021-03-09 19:45:52 +00:00
|
|
|
#[derive(PartialEq, Props)]
|
|
|
|
pub struct ExampleProps {
|
|
|
|
some_field: String,
|
2021-03-08 02:28:20 +00:00
|
|
|
}
|
|
|
|
|
2021-06-01 22:33:15 +00:00
|
|
|
static SomeComponent: FC<ExampleProps> = |ctx| {
|
2021-03-23 03:52:54 +00:00
|
|
|
let blah = rsx! {
|
|
|
|
div {}
|
|
|
|
};
|
|
|
|
|
|
|
|
let data = match 1 {
|
|
|
|
1 => ctx.render(rsx! (
|
|
|
|
div {
|
|
|
|
h1 {}
|
|
|
|
h3 {}
|
|
|
|
}
|
|
|
|
)),
|
|
|
|
1 => ctx.render(rsx!( div { "abc" } )),
|
|
|
|
2 => ctx.render(rsx!( div { "abc" } )),
|
|
|
|
3 => ctx.render(rsx!( div { "abc" } )),
|
|
|
|
_ => todo!(),
|
|
|
|
};
|
|
|
|
|
|
|
|
let data = match 1 {
|
|
|
|
1 => ctx.render(rsx! (
|
|
|
|
div {
|
|
|
|
h1 {}
|
|
|
|
h3 {}
|
|
|
|
}
|
|
|
|
)),
|
|
|
|
1 => ctx.render(rsx!(
|
|
|
|
div { "abc" }
|
|
|
|
)),
|
|
|
|
2 => ctx.render(rsx!(
|
|
|
|
div { "abc" }
|
|
|
|
)),
|
|
|
|
3 => ctx.render(rsx!(
|
|
|
|
div { "abc" }
|
|
|
|
)),
|
|
|
|
_ => todo!(),
|
|
|
|
};
|
|
|
|
|
|
|
|
let i = (0..10).map(|v| {
|
|
|
|
rsx! {
|
|
|
|
div {
|
|
|
|
"{v}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2021-03-09 19:45:52 +00:00
|
|
|
ctx.render(rsx! {
|
2021-03-23 03:52:54 +00:00
|
|
|
div {
|
|
|
|
""
|
|
|
|
}
|
2021-03-09 19:45:52 +00:00
|
|
|
})
|
|
|
|
};
|
|
|
|
|
2021-03-08 02:28:20 +00:00
|
|
|
fn main() {}
|