Move towards a new reconciler model, undo a lot of the weird stretch integrations I had done, separate out Layout and Appearance concepts, introduce ComponentKey and constructor lifecycle for components
This commit is contained in:
parent
6fd3f79099
commit
91266cc841
31 changed files with 820 additions and 941 deletions
|
|
@ -220,21 +220,16 @@ impl Element {
|
|||
let component_name = Literal::string(&typename.to_string());
|
||||
|
||||
Ok(quote!(
|
||||
alchemy::RSX::node(#component_name, || {
|
||||
std::sync::Arc::new(std::sync::RwLock::new(#typename::default()))
|
||||
}, alchemy::Props {
|
||||
attributes: {
|
||||
let mut attributes = std::collections::HashMap::new();
|
||||
#attributes
|
||||
attributes
|
||||
},
|
||||
children: {
|
||||
let mut children = vec![];
|
||||
#children
|
||||
children
|
||||
},
|
||||
key: "".into(),
|
||||
styles: #styles
|
||||
alchemy::RSX::node(#component_name, |key| {
|
||||
Box::new(#typename::constructor(key))
|
||||
}, alchemy::Props::new("".into(), #styles, {
|
||||
let mut attributes = std::collections::HashMap::new();
|
||||
#attributes
|
||||
attributes
|
||||
}), {
|
||||
let mut children = vec![];
|
||||
#children
|
||||
children
|
||||
})
|
||||
))
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue