wip: some ideas

This commit is contained in:
Jonathan Kelley committed 2021-07-18 03:54:42 -04:00
1 parent 583fdfa561
commit 05c909f320
21 files changed
+662 -1112

No files matched your search

+2 -2
View File
@@ -22,7 +22,7 @@ async fn main() -> Result<(), std::io::Error> {
let dom = VirtualDom::launch_with_props_in_place(Example, ExampleProps { initial_name });
Ok(Response::builder(200)
.body(format!("{}", dioxus_ssr::render_root(&dom)))
.body(format!("{}", dioxus_ssr::render_vdom(&dom)))
.content_type(tide::http::mime::HTML)
.build())
});
@@ -38,7 +38,7 @@ struct ExampleProps {
initial_name: String,
}
pub static Example: FC<ExampleProps> = |cx| {
static Example: FC<ExampleProps> = |cx| {
let dispaly_name = use_state(cx, move || cx.initial_name.clone());
cx.render(rsx! {
+1 -1
View File
@@ -15,7 +15,7 @@ fn main() {
let mut dom = VirtualDom::new(App);
dom.rebuild_in_place().expect("failed to run virtualdom");
file.write_fmt(format_args!("{}", TextRenderer::new(&dom)))
file.write_fmt(format_args!("{}", TextRenderer::from_vdom(&dom)))
.unwrap();
}