WIP: still a bit stumped on DFS vs BFS
This commit is contained in:
1 parent
89f2290692
commit
3740f81383
6 files changed
+205
-291
No files matched your search
@@ -1,34 +1,19 @@
|
||||
//! An example that shows how to:
|
||||
//! create a scope,
|
||||
//! render a component,
|
||||
//! change some data
|
||||
//! render it again
|
||||
//! consume the diffs and write that to a renderer
|
||||
|
||||
use dioxus_core::prelude::*;
|
||||
|
||||
fn main() -> Result<(), ()> {
|
||||
let p1 = Props { name: "bob".into() };
|
||||
|
||||
let _vdom = VirtualDom::new_with_props(Example, p1);
|
||||
// vdom.progress()?;
|
||||
let mut vdom = VirtualDom::new_with_props(Example, p1);
|
||||
vdom.update_props(|p: &mut Props| {});
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
struct Props {
|
||||
name: String,
|
||||
}
|
||||
|
||||
// impl Properties for Props {
|
||||
// fn call(&self, ptr: *const ()) {}
|
||||
|
||||
// // fn new() -> Self {
|
||||
// // todo!()
|
||||
// // }
|
||||
// }
|
||||
|
||||
static Example: FC<Props> = |ctx, _props| {
|
||||
ctx.render(html! {
|
||||
<div>
|
||||
|
||||
Reference in new issue
Block a user