docs: update local examples and docs to support new syntaxes
This commit is contained in:
1 parent
e495b09bf1
commit
4de16c4779
118 files changed
+520
-1154
No files matched your search
+4
-4
@@ -5,11 +5,11 @@ use dioxus::ssr;
|
||||
|
||||
fn main() {
|
||||
let mut vdom = VirtualDom::new(App);
|
||||
// vdom.rebuild_in_place().expect("Rebuilding failed");
|
||||
println!("{}", ssr::render_vdom(&vdom, |c| c));
|
||||
vdom.rebuild_in_place().expect("Rebuilding failed");
|
||||
println!("{}", ssr::render_vdom(&vdom));
|
||||
}
|
||||
|
||||
static App: Component<()> = |cx, props| {
|
||||
static App: Component<()> = |cx| {
|
||||
cx.render(rsx!(
|
||||
div {
|
||||
h1 { "Title" }
|
||||
@@ -21,6 +21,6 @@ static App: Component<()> = |cx, props| {
|
||||
struct MyProps<'a> {
|
||||
text: &'a str,
|
||||
}
|
||||
fn App2(cx: Scope, props: &MyProps) -> Element {
|
||||
fn App2<'a>(cx: Scope<'a, MyProps<'a>>) -> Element {
|
||||
None
|
||||
}
|
||||
Reference in new issue
Block a user