It's more of a feature in the ComponentDomParser but I write it down here for the time when we transfer the projects over to the new GitHub organization.
We should find a way to lazy instantiate components when a specific condition is fulfilled. Therefore we can avoid the instantiation of sub-components within a parent component. So instead of doing this:
import {Component} from 'nodeproto';
import SubComponent from 'ma-subcomponent';
class ParentComponent extends Component {
// yada yada yada yada
anAction () {
let subc = new SubComponent();
}
}
we should find a way to do this in a declarative way, like:
import {Component} from 'nodeproto';
class ParentComponent extends Component {
// yada yada yada yada
anAction () {
this.modalVisible = true;
}
}
<div data-component="ParentComponent">
<div data-component="SubComponent" data-component-when="ParentComponent.modalVisible">
yip yip yip
</div>
</div>
@Inkdpixels @grebaldi What do you think?