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:
Ryan McGrath 2019-05-27 00:22:33 -07:00
parent 6fd3f79099
commit 91266cc841
No known key found for this signature in database
GPG key ID: 811674B62B666830
31 changed files with 820 additions and 941 deletions

View file

@ -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
})
))
}