Slight tweak to how gets created on demand. We use an now, for mutability/immutability needs in the reconciliation process. Not sure offhand how much the double lock of will affect things, but that's a problem for later.

This commit is contained in:
Ryan McGrath 2019-05-24 21:44:35 -07:00
parent 4bf89f5d91
commit c7ef19a943
No known key found for this signature in database
GPG key ID: 811674B62B666830
8 changed files with 53 additions and 43 deletions

View file

@ -220,7 +220,9 @@ impl Element {
let component_name = Literal::string(&typename.to_string());
Ok(quote!(
alchemy::RSX::node(#component_name, || Box::new(#typename::default()), alchemy::Props {
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